fix: various issues arising from oak removal (#23)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export * from "../server.ts";
|
||||
@@ -1,5 +1,3 @@
|
||||
import { oak } from "../../api_deps.ts";
|
||||
|
||||
// Jokes courtesy of https://punsandoneliners.com/randomness/programmer-jokes/
|
||||
const JOKES = [
|
||||
"Why do Java developers often wear glasses? They can’t C#.",
|
||||
@@ -14,7 +12,8 @@ const JOKES = [
|
||||
"An SEO expert walked into a bar, pub, inn, tavern, hostelry, public house.",
|
||||
];
|
||||
|
||||
export default (ctx: oak.Context) => {
|
||||
export default (_req: Request): Response => {
|
||||
const randomIndex = Math.floor(Math.random() * 10);
|
||||
ctx.response.body = JOKES[randomIndex];
|
||||
const body = JOKES[randomIndex];
|
||||
return new Response(body);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user