From d4791f3d357634daf506fb8f91cc5332a794c421 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Fri, 20 Jun 2025 14:53:38 -0700 Subject: Move to nodejs --- u/server/activity/fourohfour.ts | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'u/server/activity/fourohfour.ts') diff --git a/u/server/activity/fourohfour.ts b/u/server/activity/fourohfour.ts index 33cfe5f..cd90ba0 100644 --- a/u/server/activity/fourohfour.ts +++ b/u/server/activity/fourohfour.ts @@ -1,29 +1,28 @@ import { - type IActivity, - type ITraceable, - JsonResponse, - type PenguenoRequest, - type ServerTrace, -} from "@emprespresso/pengueno"; + type IActivity, + type ITraceable, + JsonResponse, + type PenguenoRequest, + type ServerTrace, +} from '@emprespresso/pengueno'; const messages = [ - "D: meow-t found! your api call ran away!", - "404-bidden! but like...in a cute way >:3 !", - ":< your data went on a paw-sible vacation!", - "uwu~ not found, but found our hearts instead!", + 'D: meow-t found! your api call ran away!', + '404-bidden! but like...in a cute way >:3 !', + ':< your data went on a paw-sible vacation!', + 'uwu~ not found, but found our hearts instead!', ]; -const randomFourOhFour = () => - messages[Math.floor(Math.random() * messages.length)]; +const randomFourOhFour = () => messages[Math.floor(Math.random() * messages.length)]!; export interface IFourOhFourActivity { - fourOhFour: IActivity; + fourOhFour: IActivity; } export class FourOhFourActivityImpl implements IFourOhFourActivity { - public fourOhFour(req: ITraceable) { - return req - .move(new JsonResponse(req, randomFourOhFour(), { status: 404 })) - .map((resp) => Promise.resolve(resp.get())) - .get(); - } + public fourOhFour(req: ITraceable) { + return req + .move(new JsonResponse(req, randomFourOhFour(), { status: 404 })) + .map((resp) => Promise.resolve(resp.get())) + .get(); + } } -- cgit v1.2.3-70-g09d2