hippofish/packages/backend/src/server/api/endpoints/release.ts
2023-01-15 13:18:10 -08:00

29 lines
556 B
TypeScript

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