| Current Path : /proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/ |
| Current File : //proc/thread-self/root/snap/lxd/current/share/lxd-ui/assets/useClusterGroups-BmTnhLw-.js |
import{R as t,O as s,J as n,x as r}from"./index-BsQN_SZU.js";const u=async()=>fetch(`${t}/1.0/cluster/groups?recursion=1`).then(s).then(e=>e.metadata),a=async e=>fetch(`${t}/1.0/cluster/groups/${encodeURIComponent(e)}`).then(s).then(o=>o.metadata),p=async e=>{await fetch(`${t}/1.0/cluster/groups/${encodeURIComponent(e.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(s)},y=async e=>{await fetch(`${t}/1.0/cluster/groups`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(s)},h=async e=>{await fetch(`${t}/1.0/cluster/groups/${encodeURIComponent(e)}`,{method:"DELETE"}).then(s)},l=()=>n({queryKey:[r.cluster,r.groups],queryFn:u}),d=e=>n({queryKey:[r.cluster,r.groups,e],queryFn:async()=>a(e)});export{p as a,l as b,y as c,h as d,d as u};