Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
JavaScript
1234567891011121314151617import { authorize } from "../../backend/authorization.mjs";
export async function handler(event, context) { // Make sure this is a GET request if (event.httpMethod !== "GET") { return respond(405, { error: "Wrong request type." }); }
const user = await authorize(event.headers, "aesthetic");
return { statusCode: 200, body: JSON.stringify({ authorized: !!user }), headers: { "Content-Type": "application/json" }, };}