Website/pages/api/v1/meta/index.ts
TheClashFruit 0a8b61c472
All checks were successful
Lint Codebase / lint (push) Successful in 54s
feat: add /meta apis
2024-09-01 15:47:31 +02:00

20 lines
394 B
TypeScript

import getConfig from 'next/config';
import type { NextApiRequest, NextApiResponse } from 'next';
export default function handler(
req: NextApiRequest,
res: NextApiResponse<any>,
) {
const { publicRuntimeConfig } = getConfig();
let { git } = publicRuntimeConfig;
git.commit.created = new Date(git.commit.created).getTime();
res
.status(200)
.json({
git,
});
}