diff --git a/functions/api/login.js b/functions/api/login.js index 27384b1..0ec89bd 100644 --- a/functions/api/login.js +++ b/functions/api/login.js @@ -1,4 +1,8 @@ -const json=(d,o)=>new Response(JSON.stringify(d),{...o,headers:{'Content-Type':'application/json',...(o?.headers||{})}}); +const json = (d, o = {}) => { + const h = new Headers(o.headers); + h.set('Content-Type', 'application/json'); + return new Response(JSON.stringify(d), { ...o, headers: h }); +}; const tsEq=(a,b)=>{let d=a.length^b.length;for(let i=0;i