Deployment interface
This commit is contained in:
@@ -3,26 +3,6 @@ import testAuth from "../auth";
|
||||
import { StatusCodes } from "http-status-codes";
|
||||
import { deployApp, getDeployments } from "@/core/deployment";
|
||||
|
||||
export async function GET(req: NextRequest): Promise<NextResponse> {
|
||||
const auth = await testAuth(req);
|
||||
|
||||
if (auth) {
|
||||
return NextResponse.json(
|
||||
{ message: auth },
|
||||
{ status: StatusCodes.UNAUTHORIZED }
|
||||
);
|
||||
}
|
||||
|
||||
// const apps = await getApps();
|
||||
|
||||
const apps = await getDeployments([]);
|
||||
|
||||
return NextResponse.json({
|
||||
message: "ok",
|
||||
apps,
|
||||
});
|
||||
}
|
||||
|
||||
export async function POST(req: NextRequest): Promise<NextResponse> {
|
||||
const auth = await testAuth(req);
|
||||
const { name, appId }: { name: string; appId: string } = await req.json();
|
||||
|
||||
Reference in New Issue
Block a user