UNPKG

@directus/sdk

Version:

Directus JavaScript SDK

2 lines 627 B
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=(t,n,r)=>()=>{let i={};return Array.isArray(t)?(e(t,`keysOrQuery cannot be empty`),i={keys:t}):(e(Object.keys(t),`keysOrQuery cannot be empty`),i={query:t}),i.data=n,{path:`/comments`,params:r??{},body:JSON.stringify(i),method:`PATCH`}},n=(e,t)=>()=>({path:`/comments`,params:t??{},body:JSON.stringify(e),method:`PATCH`}),r=(t,n,r)=>()=>(e(String(t),`Key cannot be empty`),{path:`/comments/${t}`,params:r??{},body:JSON.stringify(n),method:`PATCH`});export{r as updateComment,t as updateComments,n as updateCommentsBatch}; //# sourceMappingURL=comments.js.map