Spaces:
Configuration error
Configuration error
Download src/pages/api/version.ts from SreejithSHR/umami: direct link, hf CLI and curl.
- Browser
- Download file 433 Bytes
-
https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/pages/api/version.ts
- Command line
-
hf download hf://spaces/SreejithSHR/umami/src/pages/api/version.ts
-
curl -L -o version.ts https://huggingface.co/spaces/SreejithSHR/umami/resolve/main/src/pages/api/version.ts
433 Bytes
| import { NextApiRequest, NextApiResponse } from 'next'; | |
| import { ok, methodNotAllowed } from 'next-basics'; | |
| import { CURRENT_VERSION } from 'lib/constants'; | |
| export interface VersionResponse { | |
| version: string; | |
| } | |
| export default async (req: NextApiRequest, res: NextApiResponse<VersionResponse>) => { | |
| if (req.method === 'GET') { | |
| return ok(res, { | |
| version: CURRENT_VERSION, | |
| }); | |
| } | |
| return methodNotAllowed(res); | |
| }; | |