Skip to content

Commit d0c92d8

Browse files
committed
fix: update API key deletion authorization check
- Changed the authorization check for deleting an API key to use referenceId instead of userId, ensuring proper validation against the current user's ID.
1 parent 72974e0 commit d0c92d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/dokploy/server/api/routers

apps/dokploy/server/api/routers/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ export const userRouter = createTRPCRouter({
465465
});
466466
}
467467

468-
if (apiKeyToDelete.userId !== ctx.user.id) {
468+
if (apiKeyToDelete.referenceId !== ctx.user.id) {
469469
throw new TRPCError({
470470
code: "UNAUTHORIZED",
471471
message: "You are not authorized to delete this API key",

0 commit comments

Comments
 (0)