UNPKG

corellium-typescript

Version:
1 lines 251 B
const t=async(t,n)=>{const o=new URL("/api/v1/users/login",t),e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!e.ok)throw new Error(e.statusText);return await e.json()};export{t as generateToken};