Files
calendar/apps/web/pages/api/version.ts
T
Agusti Fernandez PardoGitHubAgusti Fernandez Pardokodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
5ec4b7ad37 feat: adds new version endpoint in internal api (#3155)
Co-authored-by: Agusti Fernandez Pardo <git@agusti.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-06-25 05:37:29 +00:00

11 lines
311 B
TypeScript

import type { NextApiRequest, NextApiResponse } from "next";
import * as pjson from "package.json";
type Response = {
version: string;
};
export default async function handler(req: NextApiRequest, res: NextApiResponse<Response>): Promise<void> {
return res.status(200).json({ version: pjson.version });
}