File: /var/www/quadcode.com/build/server/chunks/_server.ts-db15389f.js
import { t } from './shared-server-c92518c6.js';
import { d } from './index-d9e8b680.js';
const g=async a=>{const{request:o}=a,{page:e,perPage:n,authorId:r}=await o.json(),t$1=await fetch(`${t.PRIVATE_WP_URL}/wp-json/wp/v2/posts/?per_page=${n}&page=${e}&author=${r}`,{method:"GET",headers:{"content-type":"Application/json"}});if(t$1.ok){const p=t$1.headers.get("X-WP-TotalPages"),c=await t$1.json();return d({status:"ok",data:{posts:c,totalPages:p}},{status:200})}else return d({status:"ok",data:{posts:[],totalPages:1}},{status:200})};
export { g as POST };
//# sourceMappingURL=_server.ts-db15389f.js.map