From a0e119ec5bf1e9c7259ac610de06977152575f37 Mon Sep 17 00:00:00 2001 From: EJS00102 <52255287+EJS00102@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:59:54 +0200 Subject: [PATCH] Fixed case where subscried is null, defaulting to true --- packages/api/src/controllers/v1/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/controllers/v1/index.ts b/packages/api/src/controllers/v1/index.ts index 6e9c247..90978db 100644 --- a/packages/api/src/controllers/v1/index.ts +++ b/packages/api/src/controllers/v1/index.ts @@ -81,7 +81,7 @@ export class V1 { if (subscribed !== undefined && contact.subscribed !== subscribed) { contact = await prisma.contact.update({ where: { id: contact.id }, - data: { subscribed }, + data: { subscribed: subscribed ?? true }, }); redis.del(Keys.Contact.id(contact.id));