Added "approved by" system

This commit is contained in:
2026-01-16 16:26:20 -05:00
parent 1c1358f9d0
commit 19eb2be252
4 changed files with 56 additions and 23 deletions

View File

@@ -16,10 +16,11 @@ ur.use(requireLogin)
ur.post('/', [requireRole(["17th Command", "17th Administrator", "17th HQ"]), requireMemberState(MemberState.Member)], async (req: express.Request, res: express.Response) => {
try {
const change = req.body.promotions as BatchPromotionMember[];
const approver = req.body.approver as number;
const author = req.user.id;
if (!change) res.sendStatus(400);
await batchInsertMemberRank(change, author);
await batchInsertMemberRank(change, author, approver);
logger.info('app', 'Promotion batch submitted', { author: author })
res.sendStatus(201);
} catch (error) {