This commit is contained in:
payacom
2026-08-31 20:45:41 +03:30
parent fa9f23c61d
commit 3f416a7a60
367 changed files with 621895 additions and 6443 deletions

View File

@@ -0,0 +1,18 @@
const { userHasPostExpertise, respondPostExpertiseRequired } = require('../utils/postProfile')
/** برای ثبت پست، تخصص کاربر باید مشخص شده باشد */
module.exports = (req, res, next) => {
const user = req.user
if (!user) {
return res.status(401).json({
error: true,
message: 'You are not authorized!',
})
}
if (!userHasPostExpertise(user)) {
return respondPostExpertiseRequired(res)
}
next()
}