| 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/image-registries-YAuyq4CZ.js |
import{R as n,az as s,cp as i}from"./index-BFGypnt-.js";import{b as c}from"./images-C6WqBeZG.js";const o=["can_edit","can_delete"],h=async e=>{const t=new URLSearchParams;return t.set("recursion","1"),i(t,e,o),fetch(`${n}/1.0/image-registries?${t.toString()}`).then(s).then(a=>a.metadata)},d=async(e,t)=>{const a=new URLSearchParams;return a.set("recursion","1"),i(a,t,o),fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}?${a.toString()}`).then(s).then(r=>r.metadata)},p=async(e,t)=>{const a=new URLSearchParams;return a.set("recursion","1"),i(a,t,o),fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}/images?${a.toString()}`).then(s).then(r=>r.metadata.sort(c))},y=async e=>{await fetch(`${n}/1.0/image-registries`,{method:"POST",headers:{"Content-Type":"application/json"},body:e}).then(s)},R=async(e,t)=>{await fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}).then(s)},$=async e=>{await fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}`,{method:"DELETE"}).then(s)},f=async(e,t)=>{await fetch(`${n}/1.0/image-registries/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:t}).then(s)};export{p as a,d as b,y as c,$ as d,h as f,R as r,f as u};