新增邮件发送和管理员功能
This commit is contained in:
@@ -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));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user