Fix: move keys and model-load routes under /api/v1/admin prefix
CI / test (push) Failing after 12m38s

Routes now consistently under admin session auth:
- /api/v1/admin/keys (GET, POST, DELETE)
- /api/v1/admin/models/:name/load (POST)

Rebuilt frontend assets.
This commit is contained in:
2026-07-31 17:17:23 -04:00
parent 4d34c6d31a
commit ddc73957cb
18 changed files with 62 additions and 58 deletions
+21
View File
@@ -0,0 +1,21 @@
import{d as u,u as m,c,a as e,F as y,i as x,b as r,e as a,R as k,h as g,o as n,j as b,n as f,k as v,l as _,m as L,p as C,t as w}from"./index-DGy3EgY7.js";import{c as s}from"./createLucideIcon-C8BmASko.js";import{K as M}from"./key-BRxFGImj.js";import{C as I}from"./cpu-D29LpvoC.js";/**
* @license lucide-vue-next v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V=s("ChartColumnIcon",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
* @license lucide-vue-next v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const D=s("LayoutDashboardIcon",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-vue-next v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const R=s("LogOutIcon",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
* @license lucide-vue-next v0.460.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const A=s("UsersIcon",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),B={class:"min-h-screen bg-background"},U={class:"fixed left-0 top-0 h-full w-64 bg-surface border-r border-border flex flex-col"},z={class:"flex-1 p-4 space-y-1"},K={class:"p-4 border-t border-border"},S={class:"ml-64 min-h-screen p-8"},q=u({__name:"Layout",setup(F){const d=_(),i=g(),l=m(),h=[{name:"Dashboard",path:"/admin/",icon:D},{name:"API Keys",path:"/admin/keys",icon:M},{name:"Models",path:"/admin/models",icon:I},{name:"Usage",path:"/admin/usage",icon:V},{name:"Admin Users",path:"/admin/users",icon:A}];function p(){l.logout(),i.push("/admin/login")}return(H,o)=>(n(),c("div",B,[e("aside",U,[o[1]||(o[1]=e("div",{class:"p-6 border-b border-border"},[e("h1",{class:"text-xl font-bold text-primary"},"LlamaLink"),e("p",{class:"text-xs text-text-muted mt-1"},"Admin Panel")],-1)),e("nav",z,[(n(),c(y,null,x(h,t=>r(a(v),{key:t.path,to:t.path,class:f(["flex items-center gap-3 px-4 py-3 rounded-lg transition-colors",a(d).path===t.path||t.path!=="/admin/"&&a(d).path.startsWith(t.path)?"bg-primary/10 text-primary":"text-text-muted hover:text-text hover:bg-border"])},{default:b(()=>[(n(),L(C(t.icon),{class:"w-5 h-5"})),e("span",null,w(t.name),1)]),_:2},1032,["to","class"])),64))]),e("div",K,[e("button",{onClick:p,class:"flex items-center gap-3 w-full px-4 py-3 rounded-lg text-text-muted hover:text-error hover:bg-error/10 transition-colors"},[r(a(R),{class:"w-5 h-5"}),o[0]||(o[0]=e("span",null,"Logout",-1))])])]),e("main",S,[r(a(k))])]))}});export{q as default};