This commit merges API routes and pages into a single concept. The pages/api folder is now not special anymore.
13 lines
234 B
TypeScript
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");
|
|
},
|
|
};
|