feat: 添加获取 cnb-board live mdContent 内容的路由,修正时间戳处理

This commit is contained in:
2026-02-24 02:12:05 +08:00
parent f67ca752f3
commit dff858d820
3 changed files with 34 additions and 32 deletions

View File

@@ -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({