diff --git a/apps/dokploy/server/api/routers/user.ts b/apps/dokploy/server/api/routers/user.ts index 56b37b7af..feafa8b58 100644 --- a/apps/dokploy/server/api/routers/user.ts +++ b/apps/dokploy/server/api/routers/user.ts @@ -465,7 +465,7 @@ export const userRouter = createTRPCRouter({ }); } - if (apiKeyToDelete.userId !== ctx.user.id) { + if (apiKeyToDelete.referenceId !== ctx.user.id) { throw new TRPCError({ code: "UNAUTHORIZED", message: "You are not authorized to delete this API key",