This commit is contained in:
2025-11-18 01:30:57 +08:00
parent 388705b646
commit 6d32fedfb0
10 changed files with 126 additions and 51 deletions

View File

@@ -5,7 +5,10 @@ import { shopDefine } from './define.ts';
app
.route({
...shopDefine.get('getRegistry'),
middleware: ['auth'],
middleware: ['admin-auth'],
metadata: {
admin: true,
}
})
.define(async (ctx) => {
const registry = assistantConfig.getRegistry();
@@ -17,7 +20,10 @@ app
app
.route({
...shopDefine.get('listInstalled'),
middleware: ['auth'],
middleware: ['admin-auth'],
metadata: {
admin: true,
}
})
.define(async (ctx) => {
const manager = new AssistantApp(assistantConfig);
@@ -30,7 +36,10 @@ app
app
.route({
...shopDefine.get('install'),
middleware: ['auth'],
middleware: ['admin-auth'],
metadata: {
admin: true,
}
})
.define(async (ctx) => {
// https://localhost:51015/client/router?path=shop&key=install
@@ -52,7 +61,10 @@ app
app
.route({
...shopDefine.get('uninstall'),
middleware: ['auth'],
middleware: ['admin-auth'],
metadata: {
admin: true,
}
})
.define(async (ctx) => {
// https://localhost:51015/client/router?path=shop&key=uninstall