import{i as e,n as t,r as n,t as r}from"./client-BTeclN8X.js";async function i(){let e=await t(`/api/v1/friends`);if(e.code!==0||!e.data)throw Error(e.msg||`获取友链失败`);return e.data}async function a(){let e=await t(`/api/v1/admin/friends`);if(e.code!==0||!e.data)throw Error(e.msg||`获取友链失败`);return e.data}async function o(t){let n=await e(`/api/v1/admin/friends`,t);if(n.code!==0||!n.data)throw Error(n.msg||`创建友链失败`);return n.data}async function s(e,t){let r=await n(`/api/v1/admin/friends/${e}`,t);if(r.code!==0)throw Error(r.msg||`更新友链失败`)}async function c(e){let t=await r(`/api/v1/admin/friends/${e}`);if(t.code!==0)throw Error(t.msg||`删除友链失败`)}export{s as a,i,c as n,a as r,o as t};