保存
This commit is contained in:
13
mail-worker/src/api/setting-api.js
Normal file
13
mail-worker/src/api/setting-api.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import app from '../hono/hono';
|
||||
import result from '../model/result';
|
||||
import settingService from '../service/setting-service';
|
||||
|
||||
app.put('/setting/set', async (c) => {
|
||||
await settingService.set(c, await c.req.json());
|
||||
return c.json(result.ok());
|
||||
})
|
||||
|
||||
app.get('/setting/query', async (c) => {
|
||||
const setting = await settingService.query(c);
|
||||
return c.json(result.ok(setting));
|
||||
})
|
||||
Reference in New Issue
Block a user