summaryrefslogtreecommitdiff
path: root/u/server/activity/fourohfour.ts
blob: 48740df0a88521e2b331463ccf54784595c27671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import {
  type ITraceable,
  JsonResponse,
  type PenguenoRequest,
  type ServerTrace,
} from "@emprespresso/pengueno";

const messages = [
  "(≧ω≦)ゞ Oopsie! This endpoint has gone a-404-dable!",
  "。゚(。ノωヽ。)゚。 Meow-t found! Your API call ran away!",
  "404-bidden! But like...in a cute way (・`ω´・) !",
  "(=①ω①=) This endpoint is hiss-terically missing!",
  "┐(´∀`)┌ Whoopsie fluff! No API here!",
  "(つ≧▽≦)つ Your data went on a paw-sible vacation!",
  "(ꈍᴗꈍ) Uwu~ not found, but found our hearts instead!",
  "ヽ(;▽;)ノ Eep! This route has ghosted you~",
];
const randomFourOhFour = () => messages[Math.random() * messages.length];
export const FourOhFourActivity = (
  req: ITraceable<PenguenoRequest, ServerTrace>,
) =>
  req
    .move(
      new JsonResponse(req, randomFourOhFour(), {
        status: 404,
      }),
    );