Files
machartaa_admin_dist/dist/assets/category-9263a13b.js
T
2026-09-27 17:26:36 +03:30

2 lines
1.1 KiB
JavaScript

import{_ as i,a3 as n,H as c,I as d,J as l}from"./index-ab3b0b84.js";const u=async t=>{if(t!=null&&t.length){const{TableEngineRequest:o}=await i(()=>import("./buildSupabaseQuery-15bd6baf.js"),["assets/buildSupabaseQuery-15bd6baf.js","assets/index-ab3b0b84.js","assets/index-43f2d491.css"]),e=await o({search:t,order:"-created_at",limit:500,page:1},"collections");return(e==null?void 0:e.rows)||[]}const a=await n("collections",{order:"-created_at"});return Array.isArray(a)?a:[]},g=async t=>{await c("collections",t)},y=async(t,a)=>d("collections",t,a),m=async t=>l("collections",t);async function p(t){const{TableEngineShopRequest:a}=await i(()=>import("./buildSupabaseQuery-15bd6baf.js"),["assets/buildSupabaseQuery-15bd6baf.js","assets/index-ab3b0b84.js","assets/index-43f2d491.css"]),o={...t};!o.sort&&!o.order&&(o.order="-id");const e=await a(o,"collections");try{if(Array.isArray(e==null?void 0:e.rows)){const s=e.rows.map(r=>({id:r.id,created_at:r.created_at??"",updated_at:r.updated_at??"",...r}));return{...e,rows:s}}}catch(s){console.log("[getCategorysTable] normalize error:",s)}return e}export{p as a,g as c,m as d,u as g,y as u};