feat(seeder): add one-time database seeding endpoint with status tracking
deploy-chabokan / deploy (push) Canceled after 0s

This commit is contained in:
2026-08-19 06:49:53 +03:30
parent 8bdd5af719
commit 284594c782
4 changed files with 96 additions and 2 deletions
+18
View File
@@ -40,3 +40,21 @@ exports.bulkUpdateSearchSettings = catchAsync(async (req, res, next) => {
data: results,
})
})
exports.getSeedStatus = catchAsync(async (req, res, next) => {
const status = await settingService.getSeedStatus()
res.status(200).json({
status: 'success',
data: status,
})
})
exports.seedDatabase = catchAsync(async (req, res, next) => {
const result = await settingService.seedDatabase(req.user?._id)
res.status(200).json({
status: 'success',
data: result,
})
})