From c8ada159a714db16ac0bf1db680cc290a86a8c7a Mon Sep 17 00:00:00 2001 From: Gerard Kavanagh Date: Thu, 6 Aug 2026 14:35:45 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20annotate=20posts=20map=20param=20?= =?UTF-8?q?=E2=80=94=20TS7031=20broke=20main=20typecheck=20and=20the=20Rai?= =?UTF-8?q?lway=20deploy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit prisma is untyped here, so the destructured map callback param had no contextual type and tsc --noEmit failed (ignoreBuildErrors=false, so the Railway build of 410efdc FAILED and prod stayed on the previous image). Annotate the param as any, matching the repo's existing idiom. --- nextjs_space/app/api/tenant-admin/posts/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextjs_space/app/api/tenant-admin/posts/route.ts b/nextjs_space/app/api/tenant-admin/posts/route.ts index 11aaf1b9..fdcbe3a1 100644 --- a/nextjs_space/app/api/tenant-admin/posts/route.ts +++ b/nextjs_space/app/api/tenant-admin/posts/route.ts @@ -115,7 +115,7 @@ export const GET = withTenantAuth(async (_request, { tenantId }) => { }); return NextResponse.json( - posts.map(({ users, ...post }) => ({ ...post, author: users })), + posts.map(({ users, ...post }: any) => ({ ...post, author: users })), ); } catch (error) { console.error("Error fetching posts:", error);