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){