From bc71efac29e477bd550c86e091f0045173bdac35 Mon Sep 17 00:00:00 2001 From: rca Date: Sat, 22 Jun 2024 16:39:38 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=82=B0=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/parent/authService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/services/parent/authService.ts b/src/services/parent/authService.ts index 9b5e86f..085ecf1 100644 --- a/src/services/parent/authService.ts +++ b/src/services/parent/authService.ts @@ -12,12 +12,15 @@ async function registUser(email: string, password: string, homeGroupId?: string) const hashedPassword = bcrypt.hashSync(password, 10); if (!homeGroupId) { // TODO: 作成失敗したときにHomeGroupだけ残るのを防ぐ + logger.info("HomeGroup is not specified, creating new HomeGroup"); createHomeGroup(email).then((homeGroup) => { return homeGroup.id }) .then((id) => { if (!id) { logger.error("Create HomeGroup failed, id is undefined") throw new Error("Create HomeGroup failed"); } + logger.info("Create HomeGroup success"); + logger.debug(`HomeGroupId: ${id}`); homeGroupId = id; }).catch((e) => { logger.error("Create HomeGroup failed");