This commit is contained in:
2025-12-27 02:28:47 +01:00
parent 70b0645093
commit 38c2c9fb6d
5 changed files with 50 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
import { NextRequest, NextResponse } from "next/server";
import { version } from "@/../package.json";
import testAuth from "../auth";
import { StatusCodes } from "http-status-codes";
export async function GET(req: NextRequest): Promise<NextResponse> {
const auth = testAuth(req);
if (auth) {
return NextResponse.json(
{ message: auth },
{ status: StatusCodes.UNAUTHORIZED }
);
}
return NextResponse.json({
message: "ok",
app: "dockship",
version,
});
}