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
+1
View File
@@ -0,0 +1 @@
import{d as b,u as g,c as n,a as e,b as x,e as u,w as y,f as m,v as c,t as _,g as w,r as d,o as l,h}from"./index-DGy3EgY7.js";import{K as k}from"./key-BRxFGImj.js";import"./createLucideIcon-C8BmASko.js";const L={class:"min-h-screen bg-background flex items-center justify-center"},V={class:"w-full max-w-md"},S={class:"card"},U={class:"flex items-center gap-3 mb-6"},B={class:"w-12 h-12 bg-primary/10 rounded-xl flex items-center justify-center"},E={key:0,class:"p-3 bg-error/10 border border-error/20 rounded-lg text-error text-sm"},N=["disabled"],j={key:0},q={key:1},M=b({__name:"Login",setup(A){const p=h(),o=g(),r=d(""),a=d(""),t=d("");async function v(){if(!r.value.trim()){t.value="Username is required";return}if(!a.value){t.value="Password is required";return}await o.login(r.value,a.value)?p.push("/admin/"):t.value=o.error||"Login failed"}return(f,s)=>(l(),n("div",L,[e("div",V,[e("div",S,[e("div",U,[e("div",B,[x(u(k),{class:"w-6 h-6 text-primary"})]),s[2]||(s[2]=e("div",null,[e("h1",{class:"text-2xl font-bold"},"LlamaLink"),e("p",{class:"text-text-muted text-sm"},"Admin Login")],-1))]),e("form",{onSubmit:y(v,["prevent"]),class:"space-y-4"},[e("div",null,[s[3]||(s[3]=e("label",{class:"block text-sm font-medium mb-2"},"Username",-1)),m(e("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"text",class:"input",placeholder:"Enter your username",autocomplete:"username"},null,512),[[c,r.value]])]),e("div",null,[s[4]||(s[4]=e("label",{class:"block text-sm font-medium mb-2"},"Password",-1)),m(e("input",{"onUpdate:modelValue":s[1]||(s[1]=i=>a.value=i),type:"password",class:"input",placeholder:"Enter your password",autocomplete:"current-password"},null,512),[[c,a.value]])]),t.value?(l(),n("div",E,_(t.value),1)):w("",!0),e("button",{type:"submit",class:"btn btn-primary w-full",disabled:u(o).loading},[u(o).loading?(l(),n("span",j,"Logging in...")):(l(),n("span",q,"Login"))],8,N)],32)])])]))}});export{M as default};