HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode.com/.svelte-kit/output/server/entries/pages/_...lang_locale_/_page.server.ts.js
import{b as a}from"../../../chunks/shared-server.js";import{n as f}from"../../../chunks/postNormalizer.js";const y=async({fetch:o,setHeaders:w,locals:d})=>{if(!a?.PRIVATE_WP_URL)return{posts:[],webinars:{upcoming:[],past:[]}};const p=d.lang,i=await o(`${a.PRIVATE_WP_URL}/wp-json/api/v1/posts?per_page=6&lang=${p}`,{headers:{"content-type":"Application/json"}});w({"Cache-Control":"public, max-age=14400"});let r=[];if(i?.ok){const s=await i.json();r=s.posts?.length?s.posts.map(n=>f(n)):[]}const b={limit:10,offset:0,orderBy:"date",order:"desc"},m=await o(`${a.PRIVATE_WP_URL}/wp-json/api/v1/webinars?lang=${p}`,{method:"POST",headers:{"content-type":"Application/json"},body:JSON.stringify(b)});let c=[],g=[];if(m?.ok){const s=await m.json(),n=new Date,{upcoming:u,past:l}=s.webinars.reduce((t,e)=>{const T=new Date(e.date);return e.youTubeLink&&e.youTubeLink!==""?t.past.push(e):T>n?t.upcoming.push(e):t.past.push(e),t},{upcoming:[],past:[]});u.sort((t,e)=>new Date(t.date).getTime()-new Date(e.date).getTime()),l.sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime()),c=u,g=l}return{posts:r,webinars:{upcoming:c,past:g}}};export{y as load};