feat: admin

This commit is contained in:
archer
2023-06-10 15:23:35 +08:00
parent 7f9899f7f3
commit 7dd8e7bea1
9 changed files with 185 additions and 195 deletions

View File

@@ -1,8 +1,9 @@
import { User, Model, Kb } from '../schema.js';
import { auth } from './system.js';
export const useAppRoute = (app) => {
// 获取AI助手列表
app.get('/models', async (req, res) => {
app.get('/models', auth(), async (req, res) => {
try {
const start = parseInt(req.query._start) || 0;
const end = parseInt(req.query._end) || 20;