Structured libs

This commit is contained in:
2026-02-14 16:42:11 +01:00
parent a7e29867b8
commit 1331e36177
15 changed files with 42 additions and 38 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from "next/server";
import testAuth from "../auth";
import testAuth from "../../../lib/server/auth";
import { StatusCodes } from "http-status-codes";
import { getDocker, removeContainer } from "@/core/docker";
import { Docker } from "@/lib/types";
@@ -10,7 +10,7 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
if (auth) {
return NextResponse.json(
{ message: auth },
{ status: StatusCodes.UNAUTHORIZED }
{ status: StatusCodes.UNAUTHORIZED },
);
}
@@ -30,14 +30,14 @@ export async function DELETE(req: NextRequest): Promise<NextResponse> {
if (!id) {
return NextResponse.json(
{ message: "Invalid containerId param" },
{ status: StatusCodes.BAD_REQUEST }
{ status: StatusCodes.BAD_REQUEST },
);
}
if (auth) {
return NextResponse.json(
{ message: auth },
{ status: StatusCodes.UNAUTHORIZED }
{ status: StatusCodes.UNAUTHORIZED },
);
}