Commit c8621d6b authored by Xuguangxing's avatar Xuguangxing

feat: 增加查询服务器时间接口

parent e34b410f
......@@ -127,4 +127,7 @@ export default class EditorController extends Controller {
const pageInfo = await ctx.model.PageInfo.update({ enable: 0 }, {where: { id: +ctx.params.pageId, tenantId: ctx.headers['qg-tenant-id'] }});
ctx.body = ctx.helper.ok(pageInfo);
}
public async getServerTime(ctx: Context) {
ctx.body = ctx.helper.ok(new Date().getTime());
}
}
\ No newline at end of file
......@@ -14,6 +14,7 @@ export default (application: Application) => {
router.post('/editor/clearcache', controller.editor.clearCache);
router.get('/editor/get/list', controller.editor.getList);
router.get('/editor/get/template', controller.editor.getTemplateList);
router.get('/editor/getServerTime', controller.editor.getServerTime);
router.get('/editor/get/:uuid', controller.editor.get);
router.delete('/editor/:pageId', controller.editor.delete);
router.get('/editor/login', controller.editor.login);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment