check
This commit is contained in:
@@ -433,7 +433,7 @@ const getAdvertisingsWeb = async (req, res, next) => {
|
||||
const { page = 1, limit = 10, province, city, category, search, sort } = req.query
|
||||
|
||||
const filter = {
|
||||
status: billboardPublicStatusFilter(),
|
||||
status: billboardPublicStatusFilter()
|
||||
}
|
||||
if (province) {
|
||||
const provinceFind = await ProvinceModel.findOne({ id: province }, { _id: 0 })
|
||||
@@ -830,22 +830,16 @@ const addComment = async (req, res, next) => {
|
||||
|
||||
const decodedToken = jwt.verify(token, process.env.APP_SECRET)
|
||||
const userId = decodedToken.id
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const user = await UserModel.findById(decodedToken.id)
|
||||
// if (user.is_verified !== 'verified') {
|
||||
// return res.status(422).json({
|
||||
// error: true,
|
||||
// message: 'مدارک شما تایید نشده است'
|
||||
// })
|
||||
// }
|
||||
const newComment = await saveCommentWithModerationStatus(
|
||||
AdvertisingComment,
|
||||
{
|
||||
advertisingId,
|
||||
userId,
|
||||
text,
|
||||
text
|
||||
},
|
||||
'text'
|
||||
'text',
|
||||
user?.verify_badge
|
||||
)
|
||||
|
||||
const advertising = await AdvertisingModel.findById(advertisingId)
|
||||
|
||||
Reference in New Issue
Block a user