From f8a8cb59754c8b65905b70fd154e3b1ea8512a79 Mon Sep 17 00:00:00 2001 From: Mothana Date: Sat, 5 Oct 2024 23:43:36 +0400 Subject: [PATCH] pass null to empty rules --- src/services/storage/debitStorage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/storage/debitStorage.ts b/src/services/storage/debitStorage.ts index c06450a9..fcee0c20 100644 --- a/src/services/storage/debitStorage.ts +++ b/src/services/storage/debitStorage.ts @@ -41,7 +41,7 @@ export default class { return this.DB.getRepository(DebitAccess).update({ app_user_id: appUserId, npub: authorizedPub }, { authorized }) } async UpdateDebitAccessRules(appUserId: string, authorizedPub: string, rules?: DebitAccessRules) { - return this.DB.getRepository(DebitAccess).update({ app_user_id: appUserId, npub: authorizedPub }, { rules }) + return this.DB.getRepository(DebitAccess).update({ app_user_id: appUserId, npub: authorizedPub }, { rules: rules || null }) } async DenyDebitAccess(appUserId: string, pub: string) {