feat: 添加获取 cnb-board live mdContent 内容的路由,修正时间戳处理
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { app } from '../../app.ts';
|
||||
import { getLiveMdContent } from './live/live-content.ts';
|
||||
import './cnb-dev-env.ts';
|
||||
import z from 'zod';
|
||||
import { execCommand } from '@/module/npm-install.ts';
|
||||
import { useKey } from '@kevisual/context';
|
||||
|
||||
@@ -17,24 +15,7 @@ app.route({
|
||||
};
|
||||
}).addTo(app);
|
||||
|
||||
app.route({
|
||||
path: 'cnb-board',
|
||||
key: 'live',
|
||||
description: '获取cnb-board live的mdContent内容',
|
||||
middleware: ['auth-admin'],
|
||||
metadata: {
|
||||
args: {
|
||||
more: z.boolean().optional().describe('是否获取更多系统信息,默认false'),
|
||||
}
|
||||
}
|
||||
}).define(async (ctx) => {
|
||||
const more = ctx.query?.more ?? false
|
||||
const list = getLiveMdContent({ more: more });
|
||||
ctx.body = {
|
||||
title: '开发环境模式配置',
|
||||
list,
|
||||
};
|
||||
}).addTo(app);
|
||||
|
||||
|
||||
|
||||
app.route({
|
||||
|
||||
Reference in New Issue
Block a user