We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e21f8ca + c9b72cb commit 97a3acbCopy full SHA for 97a3acb
1 file changed
services/api/src/routes/keys.ts
@@ -95,7 +95,7 @@ app.post("/:id/rotate", async (c) => {
95
await tx
96
.update(apiKeys)
97
.set({ isActive: false, updatedAt: new Date() })
98
- .where(eq(apiKeys.id, keyId));
+ .where(and(eq(apiKeys.id, keyId), eq(apiKeys.isActive, true)));
99
100
return tx
101
.insert(apiKeys)
0 commit comments