ls-deno/routes/api/random-uuid.ts
2022-09-27 14:41:17 -05:00

11 lines
258 B
TypeScript

import { Handlers } from "$fresh/server.ts";
export const handler: Handlers = {
GET(_: Request) {
const uuid = crypto.randomUUID();
return new Response(JSON.stringify(uuid), {
headers: { "Content-Type": "application/json" },
});
},
};