From dc6add0760fe342785af5d2048ec6b8420b1cbec Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 21 Jul 2024 12:09:24 +0200 Subject: [PATCH] Fix bug in key.ts controller --- src/controller/key.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/key.ts b/src/controller/key.ts index 523fec4..25e1756 100644 --- a/src/controller/key.ts +++ b/src/controller/key.ts @@ -30,5 +30,5 @@ export const deleteKey = async (userId: string, projectId: string, keyId: string const key = await AccessKey.findOne({ _id: keyId, projectId }); if (key === null) return { code: 8002, message: "The provided key could not be found" }; - key.deleteOne(); + await key.deleteOne(); }; \ No newline at end of file