From d8bb5ec01f241473d8c368cd459832a73538bfe5 Mon Sep 17 00:00:00 2001 From: pratishta Date: Wed, 11 Dec 2024 11:32:22 -0500 Subject: [PATCH] More robust response object --- server/src/subscriber/subscriber.controller.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/subscriber/subscriber.controller.ts b/server/src/subscriber/subscriber.controller.ts index 55e581ad..208e6c32 100644 --- a/server/src/subscriber/subscriber.controller.ts +++ b/server/src/subscriber/subscriber.controller.ts @@ -192,6 +192,7 @@ export class SubscriberController { if (userExistsInCurrentList && existingUserListConfirmed) { response.status(201).send({ + confirmed: true, message: "User already subscribed." }) return; @@ -199,6 +200,7 @@ export class SubscriberController { if (existingUserListConfirmed === 0) { response.status(201).send({ + confirmed: false, message: "User is subscribed but must confirm." }) return;