Files
sweet/tests/fixture/pages/api/get_only.ts
T
Luca Casonato f5b3faf0d8 BREAKING: merge API routes and pages concept (#53)
This commit merges API routes and pages into a single concept. The
pages/api folder is now not special anymore.
2021-09-25 10:49:53 +02:00

13 lines
234 B
TypeScript

export const handler = {
GET() {
return new Response("Get fresh!", {
headers: {
"Content-Type": "application/json; charset=utf-8",
},
});
},
NOTAMETHOD() {
throw new Error("unreachable");
},
};