Initial commit

This commit is contained in:
payacom
2026-07-09 15:25:16 +03:30
parent 0b01b262fa
commit 51eb7d0224
21 changed files with 1544 additions and 98 deletions

20
utils/projectProfile.js Normal file
View File

@@ -0,0 +1,20 @@
function canCreateProject(user) {
return Boolean(
user?.user_name?.trim() &&
user?.first_name?.trim() &&
user?.last_name?.trim()
);
}
function respondProjectProfileIncomplete(res) {
return res.status(422).json({
error: true,
message:
"برای ثبت پروژه، تکمیل نام کاربری، نام و نام خانوادگی در تنظیمات الزامی است",
});
}
module.exports = {
canCreateProject,
respondProjectProfileIncomplete,
};