From 96133b773380708b5ff1184bb351b33359562eb7 Mon Sep 17 00:00:00 2001 From: leca Date: Mon, 4 Nov 2024 04:42:04 +0300 Subject: [PATCH] added test if there's no group admin --- src/controllers/group.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/group.js b/src/controllers/group.js index 9b604ca..c0d2b45 100644 --- a/src/controllers/group.js +++ b/src/controllers/group.js @@ -71,6 +71,8 @@ class GroupController { let result = await GroupService.getAdminId(groupId); + if (!result) result = -1 + return res.status(200).send(result.toString()) } }