mirror of
https://github.com/schroinerxy/cloud-mail.git
synced 2026-06-22 03:45:52 +08:00
新增支持API添加用户,查询邮件
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import app from '../hono/hono';
|
||||
import result from '../model/result';
|
||||
import publicService from '../service/public-service';
|
||||
|
||||
app.post('/public/genToken', async (c) => {
|
||||
const data = await publicService.genToken(c, await c.req.json());
|
||||
return c.json(result.ok(data));
|
||||
});
|
||||
|
||||
app.post('/public/emailList', async (c) => {
|
||||
const list = await publicService.emailList(c, await c.req.json());
|
||||
return c.json(result.ok(list));
|
||||
});
|
||||
|
||||
app.post('/public/addUser', async (c) => {
|
||||
await publicService.addUser(c, await c.req.json());
|
||||
return c.json(result.ok());
|
||||
});
|
||||
Reference in New Issue
Block a user