fix: fix hot-api for not build in bun app.mjs

This commit is contained in:
2025-12-05 20:53:25 +08:00
parent 94e331e376
commit ee33208e6c
9 changed files with 95 additions and 38 deletions

View File

@@ -1,11 +1,12 @@
import { app, assistantConfig } from '@/app.ts';
import { AppDownload } from '@/services/app/index.ts';
import { AssistantApp } from '@/module/assistant/index.ts';
import { shopDefine } from './define.ts';
app
.route({
...shopDefine.get('getRegistry'),
middleware: ['admin-auth'],
path: 'shop',
key: 'get-registry',
description: '获取应用商店注册表信息',
middleware: ['admin-auth'],
metadata: {
admin: true,
}
@@ -19,7 +20,9 @@ app
app
.route({
...shopDefine.get('listInstalled'),
path: 'shop',
key: 'list-installed',
description: '列出当前已安装的所有应用',
middleware: ['admin-auth'],
metadata: {
admin: true,
@@ -35,7 +38,9 @@ app
app
.route({
...shopDefine.get('install'),
path: 'shop',
key: 'install',
description: '安装指定的应用,可以指定 id、type、force 和 yes 参数',
middleware: ['admin-auth'],
metadata: {
admin: true,
@@ -60,7 +65,9 @@ app
app
.route({
...shopDefine.get('uninstall'),
path: 'shop',
key: 'uninstall',
description: '卸载指定的应用,可以指定 id 和 type 参数',
middleware: ['admin-auth'],
metadata: {
admin: true,