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

16
utils/postProfile.js Normal file
View File

@@ -0,0 +1,16 @@
function userHasPostExpertise(user) {
return Boolean(user?.expertise?.trim())
}
function respondPostExpertiseRequired(res) {
return res.status(422).json({
error: true,
message: 'کاربر گرامی برای ثبت پست باید تخصص کاربری خود را مشخص کنید',
type: 'expertise_required',
})
}
module.exports = {
userHasPostExpertise,
respondPostExpertiseRequired,
}