From c4e35bad2af181e12e8a3b0c45a7d56ae5e00931 Mon Sep 17 00:00:00 2001 From: Jonas Simoen Date: Tue, 11 Jun 2024 15:25:47 +0200 Subject: [PATCH] hotfix --- src/middleware/RequireTeamOwner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/RequireTeamOwner.ts b/src/middleware/RequireTeamOwner.ts index cfae3af..6c25dee 100644 --- a/src/middleware/RequireTeamOwner.ts +++ b/src/middleware/RequireTeamOwner.ts @@ -8,7 +8,7 @@ export const RequireTeamOwner = (req: any, rep: any, done: any) => { userId: true, }, where: { - id: +req.params.id, + id: +req.params.id || 0, } }).then((data) => { if(data?.userId && data.userId !== user.id){