Fixed getDeployments
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { NextRequest, NextResponse } from "next/server";
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
import testAuth from "../auth";
|
import testAuth from "../auth";
|
||||||
import { StatusCodes } from "http-status-codes";
|
import { StatusCodes } from "http-status-codes";
|
||||||
import { deployApp, getDeployments } from "@/core/deployment";
|
import { deployApp } from "@/core/deployment";
|
||||||
import { Application } from "@/lib/types";
|
import { Application } from "@/lib/types";
|
||||||
|
|
||||||
export async function POST(req: NextRequest): Promise<NextResponse> {
|
export async function POST(req: NextRequest): Promise<NextResponse> {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export async function getDeployments(): Promise<Deployment[]> {
|
|||||||
await axios.post(`http://${n.ip}:3000/api/get-deployments`, apps, {
|
await axios.post(`http://${n.ip}:3000/api/get-deployments`, apps, {
|
||||||
headers: { Authorization: `ApiKey ${n.key}` },
|
headers: { Authorization: `ApiKey ${n.key}` },
|
||||||
})
|
})
|
||||||
).data.apps
|
).data.deployments
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
).flat();
|
).flat();
|
||||||
|
|||||||
Reference in New Issue
Block a user