2022-07-27 18:58:18 +02:00
|
|
|
// import { IsNull } from 'typeorm';
|
2023-01-13 05:40:33 +01:00
|
|
|
import { fetchMeta } from "@/misc/fetch-meta.js";
|
|
|
|
import define from "../define.js";
|
2022-07-27 18:58:18 +02:00
|
|
|
|
|
|
|
export const meta = {
|
2023-01-13 05:40:33 +01:00
|
|
|
tags: ["meta"],
|
2022-07-27 18:58:18 +02:00
|
|
|
|
|
|
|
requireCredential: false,
|
|
|
|
requireCredentialPrivateMode: true,
|
|
|
|
|
|
|
|
res: {
|
2023-01-13 05:40:33 +01:00
|
|
|
type: "array",
|
|
|
|
optional: false,
|
|
|
|
nullable: false,
|
2022-07-27 18:58:18 +02:00
|
|
|
items: {
|
2023-01-13 05:40:33 +01:00
|
|
|
type: "string",
|
|
|
|
optional: false,
|
|
|
|
nullable: false,
|
2022-07-27 18:58:18 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const paramDef = {
|
2023-01-13 05:40:33 +01:00
|
|
|
type: "object",
|
2022-07-27 18:58:18 +02:00
|
|
|
properties: {},
|
|
|
|
required: [],
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
// eslint-disable-next-line import/no-default-export
|
|
|
|
export default define(meta, paramDef, async () => {
|
|
|
|
const meta = await fetchMeta();
|
2023-01-13 05:40:33 +01:00
|
|
|
const motd = await Promise.all(meta.customMOTD.map((x) => x));
|
2022-07-27 18:58:18 +02:00
|
|
|
return motd;
|
|
|
|
});
|