Skip to content

Commit d6b0022

Browse files
committed
Fixes for build
Fixes for build
1 parent b24f8c3 commit d6b0022

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

app/api/vbm/Organizations/[id]/usedRepositories/route.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export async function GET(
1818
);
1919
}
2020

21-
const resolvedParams = await params;
22-
const id = resolvedParams.id;
21+
const { id } = await params;
2322

2423
if (!id) {
2524
return NextResponse.json(

app/api/veeam/agents/[...slug]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
22

33
const API_BASE_URL = process.env.VEEAM_API_URL;
44

5-
async function proxy(request: NextRequest, { params }: { params: { slug: string[] } }) {
5+
async function proxy(request: NextRequest, { params }: { params: Promise<{ slug: string[] }> }) {
66
try {
77
if (!API_BASE_URL) {
88
return NextResponse.json(
@@ -19,7 +19,7 @@ async function proxy(request: NextRequest, { params }: { params: { slug: string[
1919
);
2020
}
2121

22-
const slug = params.slug;
22+
const { slug } = await params;
2323
const path = slug.join('/');
2424
const { searchParams } = new URL(request.url);
2525
const queryString = searchParams.toString();

app/api/veeam/backupInfrastructure/repositories/[id]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
22

33
const API_BASE_URL = process.env.VEEAM_API_URL;
44

5-
export async function DELETE(request: NextRequest, { params }: { params: { id: string } }) {
5+
export async function DELETE(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
66
if (!API_BASE_URL) {
77
return NextResponse.json({ error: 'Server configuration error' }, { status: 500 });
88
}

app/api/veeam/credentials/[id]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
22

33
const API_BASE_URL = process.env.VEEAM_API_URL;
44

5-
export async function GET(request: NextRequest, { params }: { params: { id: string } }) {
5+
export async function GET(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
66
try {
77
if (!API_BASE_URL) {
88
return NextResponse.json(
@@ -19,7 +19,7 @@ export async function GET(request: NextRequest, { params }: { params: { id: stri
1919
);
2020
}
2121

22-
const id = params.id;
22+
const { id } = await params;
2323
const endpoint = `/api/v1/credentials/${id}`;
2424
const fullUrl = `${API_BASE_URL}${endpoint}`;
2525

app/api/veeam/inventory/[...slug]/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
22

33
const API_BASE_URL = process.env.VEEAM_API_URL;
44

5-
async function proxy(request: NextRequest, { params }: { params: { slug: string[] } }) {
5+
async function proxy(request: NextRequest, { params }: { params: Promise<{ slug: string[] }> }) {
66
try {
77
if (!API_BASE_URL) {
88
return NextResponse.json(
@@ -19,7 +19,7 @@ async function proxy(request: NextRequest, { params }: { params: { slug: string[
1919
);
2020
}
2121

22-
const slug = params.slug;
22+
const { slug } = await params;
2323
const path = slug.join('/');
2424
const { searchParams } = new URL(request.url);
2525
const queryString = searchParams.toString();

0 commit comments

Comments
 (0)