mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
perf: X-Pack menu
This commit is contained in:
@@ -36,7 +36,7 @@ dependencies = [
|
||||
"pyyaml (>=6.0.2,<7.0.0)",
|
||||
"fastapi-mcp (>=0.3.4,<0.4.0)",
|
||||
"tabulate>=0.9.0",
|
||||
"sqlbot-xpack==0.0.3.10",
|
||||
"sqlbot-xpack==0.0.3.11",
|
||||
"fastapi-cache2>=0.2.2",
|
||||
"sqlparse>=0.5.3",
|
||||
"redis>=6.2.0",
|
||||
|
||||
@@ -168,5 +168,5 @@ const router = createRouter({
|
||||
},
|
||||
],
|
||||
})
|
||||
watchRouter(router)
|
||||
await watchRouter(router)
|
||||
export default router
|
||||
|
||||
@@ -6,9 +6,10 @@ const userStore = useUserStore()
|
||||
const { wsCache } = useCache()
|
||||
const whiteList = ['/login']
|
||||
const assistantWhiteList = ['/assistant']
|
||||
export const watchRouter = (router: any) => {
|
||||
export const watchRouter = async (router: any) => {
|
||||
await loadXpackStatic()
|
||||
LicenseGenerator.generateRouters(router)
|
||||
router.beforeEach(async (to: any, from: any, next: any) => {
|
||||
await loadXpackStatic()
|
||||
if (assistantWhiteList.includes(to.path)) {
|
||||
next()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user