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>
pull/3157/head
Agusti Fernandez Pardo 2022-06-25 07:37:29 +02:00 committed by GitHub
parent 3605fca9a4
commit 5ec4b7ad37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,10 @@
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 });
}