From 9cf3fc0259730b7dcf47b3ab4a04369e39fb4614 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sun, 18 May 2025 12:24:09 -0700 Subject: finish up pengueno --- u/server/activity/fourohfour.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'u/server/activity/fourohfour.ts') diff --git a/u/server/activity/fourohfour.ts b/u/server/activity/fourohfour.ts index 698dacd..48740df 100644 --- a/u/server/activity/fourohfour.ts +++ b/u/server/activity/fourohfour.ts @@ -1,16 +1,10 @@ import { type ITraceable, JsonResponse, - TraceUtil, + type PenguenoRequest, + type ServerTrace, } from "@emprespresso/pengueno"; -export enum HealthCheckInput { - CHECK, -} -export enum HealthCheckOutput { - YAASQUEEN, -} - const messages = [ "(≧ω≦)ゞ Oopsie! This endpoint has gone a-404-dable!", "。゚(。ノωヽ。)゚。 Meow-t found! Your API call ran away!", @@ -21,10 +15,13 @@ const messages = [ "(ꈍᴗꈍ) Uwu~ not found, but found our hearts instead!", "ヽ(;▽;)ノ Eep! This route has ghosted you~", ]; -export const FourOhFourActivity = (req: ITraceable) => - req.bimap(TraceUtil.withFunctionTrace(FourOhFourActivity)) - .map(() => - new JsonResponse(messages[Math.random() * messages.length], { +const randomFourOhFour = () => messages[Math.random() * messages.length]; +export const FourOhFourActivity = ( + req: ITraceable, +) => + req + .move( + new JsonResponse(req, randomFourOhFour(), { status: 404, - }) + }), ); -- cgit v1.2.3-70-g09d2