feat(server): allow single method API routes (#24)

This commit is contained in:
Leo K
2021-06-10 23:26:16 +02:00
committed by GitHub
parent 572b8123c4
commit ae1e311eb8
7 changed files with 74 additions and 15 deletions
+11
View File
@@ -0,0 +1,11 @@
export function GET() {
return new Response("Get fresh!", {
headers: {
"Content-Type": "application/json; charset=utf-8",
},
});
}
export function NOTAMETHOD() {
return new Response("unreachable");
}
+8
View File
@@ -5,3 +5,11 @@ export default () => {
},
});
};
export function GET() {
return new Response("Get fresh!", {
headers: {
"Content-Type": "application/json; charset=utf-8",
},
});
}