import{n as e,o as t}from"./admin-auth-D6OxYqSG.js";import{n}from"./server-CQ_uNuZK.js";async function r(r){try{let{username:i,password:a}=await r.json();return await t(i||``,a||``)?(await e(),n.json({ok:!0})):(await new Promise(e=>setTimeout(e,450)),n.json({error:`invalid`},{status:401}))}catch{return n.json({error:`invalid`},{status:400})}}export{r as POST};