Skip to content

Commit b367aaa

Browse files
committed
refactor: update parameter type in GET function to Promise<{ version: string }> for images and values routes
1 parent f1596e5 commit b367aaa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dify-helm-watchdog/src/app/api/versions/[version]/images/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ interface ImagesResponse {
4444
*/
4545
export async function GET(
4646
request: Request,
47-
{ params }: { params: { version: string } },
47+
{ params }: { params: Promise<{ version: string }> },
4848
) {
4949
try {
50-
const { version } = params;
50+
const { version } = await params;
5151
const url = new URL(request.url);
5252
const format = url.searchParams.get("format") || "json";
5353
const includeValidation = url.searchParams.get("include_validation") === "true";

dify-helm-watchdog/src/app/api/versions/[version]/values/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export const runtime = "nodejs";
99
*/
1010
export async function GET(
1111
_request: Request,
12-
{ params }: { params: { version: string } },
12+
{ params }: { params: Promise<{ version: string }> },
1313
) {
1414
try {
15-
const { version } = params;
15+
const { version } = await params;
1616

1717
const cache = await loadCache();
1818
if (!cache) {

0 commit comments

Comments
 (0)