FIX: UserSeeder

ADD: Get-Self endpoint for users
ADD: Category and Role Seeder
FIX: Login Check Bug
ADD: Extra fields for documents and images in belonging model
ADD: localhost:5173 to cors
ADD: SuperAdmin ID to env
This commit is contained in:
2025-01-03 17:45:09 +03:30
parent bda5bca9de
commit 465b678357
11 changed files with 180 additions and 12 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ const runSeeder = async () => {
{
_id: '66ddb52302f30f105de39e61',
name: 'main admin',
email: 'superadmin@chayamarket.ir',
email: 'superadmin@belongingm.ir',
password: '$2a$10$pabxmRjm6klipAC6vBvgI.J.GJpnG//L1MeNcdbtxuYQRYHLI/I3O',
phoneNumber: '+989123456789',
favorites: [],
@@ -20,7 +20,7 @@ const runSeeder = async () => {
await User.deleteMany({})
console.log(chalk.red('Deleted all user records.'))
await User.insertMany(users, null)
await User.create(users, null)
console.log(chalk.green.bold(`USER: Created ${users.length} user(s)`))
}