added downloding file

This commit is contained in:
2026-03-03 20:40:54 +03:30
parent a85df4984a
commit c3389fa077
307 changed files with 1866 additions and 1824 deletions
+6
View File
@@ -0,0 +1,6 @@
import{N as r,ar as s}from"./CE4SaZgW.js";const i=async e=>(await r.from("collections").select("*").select("*").order("created_at",{ascending:!1})).data,o=async e=>{const{data:t,error:a}=await r.from("collections").select(`
id, title, parentId:parent_id, created_at,
children:collections!parent_id(
id, title, parentId:parent_id, created_at
)
`).is("parent_id",null);return t},d=async e=>{await s.fetch("collections","insert",{data:e})},l=async e=>{const{data:t,error:a}=await r.rpc("get_collection_descendants",{start_id:e});if(a)throw a;return t.map(c=>c.id)},u=async(e,t)=>s.fetch("collections","update",{data:t,field:"id",value:e}),p=async e=>s.fetch("collections","delete",{field:"id",value:e});export{l as a,o as b,d as c,p as d,i as g,u};