2023-01-13 05:40:33 +01:00
|
|
|
import define from "../define.js";
|
2022-11-19 08:54:50 +01:00
|
|
|
|
|
|
|
export const meta = {
|
2023-01-13 05:40:33 +01:00
|
|
|
tags: ["meta"],
|
|
|
|
description: "Get list of Calckey patrons from Codeberg",
|
2022-11-19 08:54:50 +01:00
|
|
|
|
|
|
|
requireCredential: false,
|
|
|
|
requireCredentialPrivateMode: false,
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const paramDef = {
|
2023-01-13 05:40:33 +01:00
|
|
|
type: "object",
|
2022-11-19 08:54:50 +01:00
|
|
|
properties: {},
|
|
|
|
required: [],
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export default define(meta, paramDef, async () => {
|
|
|
|
let patrons;
|
2023-01-13 05:40:33 +01:00
|
|
|
await fetch(
|
2023-01-20 01:18:17 +01:00
|
|
|
"https://codeberg.org/calckey/calckey/raw/branch/develop/patrons.json",
|
2023-01-13 05:40:33 +01:00
|
|
|
)
|
2022-11-19 08:54:50 +01:00
|
|
|
.then((response) => response.json())
|
|
|
|
.then((data) => {
|
2023-01-13 05:40:33 +01:00
|
|
|
patrons = data["patrons"];
|
2022-11-19 08:54:50 +01:00
|
|
|
});
|
|
|
|
|
2022-11-19 09:08:45 +01:00
|
|
|
return patrons;
|
2022-11-19 08:54:50 +01:00
|
|
|
});
|