Something went wrong. Try again.
A simple to-do app focused on tasks that can be completed within a specific time span. taskline.tobinio.dev
Something went wrong. Try again.
12345678910111213141516export default defineEventHandler(async (event) => { const apiKey = getHeader(event, "x-api-key");
if (!apiKey) { throw createError({ statusCode: 401, message: "No API key provided" }); }
const data = await auth.api.verifyApiKey({ body: { key: apiKey } });
if (!data.valid || data.error) { throw createError({ statusCode: 401, message: "Invalid API key" }); }
return data.key?.referenceId;});