hippofish/packages/backend/src/server/api/endpoints/patrons.ts
ThatOneCalculator abf47e54f3
clean up w/ rome
2023-01-16 11:19:20 -08:00

28 lines
576 B
TypeScript

import define from "../define.js";
export const meta = {
tags: ["meta"],
description: "Get list of Calckey patrons from Codeberg",
requireCredential: false,
requireCredentialPrivateMode: false,
} as const;
export const paramDef = {
type: "object",
properties: {},
required: [],
} as const;
export default define(meta, paramDef, async () => {
let patrons;
await fetch(
"https://lavaforge.org/calckey/calckey/raw/branch/develop/patrons.json",
)
.then((response) => response.json())
.then((data) => {
patrons = data["patrons"];
});
return patrons;
});