新增邮件发送和管理员功能

This commit is contained in:
eoao
2025-05-29 17:38:50 +08:00
parent de742d31e7
commit 2341d14b2d
364 changed files with 24202 additions and 1079 deletions

View File

@@ -4,17 +4,17 @@ import result from '../model/result';
import userContext from '../security/user-context';
app.get('/account/list', async (c) => {
const list = await accountService.list(c, c.req.query(), await userContext.getUserId(c));
const list = await accountService.list(c, c.req.query(), userContext.getUserId(c));
return c.json(result.ok(list));
});
app.delete('/account/delete', async (c) => {
await accountService.delete(c, c.req.query(), await userContext.getUserId(c));
await accountService.delete(c, c.req.query(), userContext.getUserId(c));
return c.json(result.ok());
});
app.post('/account/add', async (c) => {
const account = await accountService.add(c, await c.req.json(), await userContext.getUserId(c));
const account = await accountService.add(c, await c.req.json(), userContext.getUserId(c));
return c.json(result.ok(account));
});