mirror of
https://github.com/r-ca/kidshift-be.git
synced 2024-10-26 00:24:02 +00:00
ログ追加
This commit is contained in:
parent
1272d8df22
commit
bc71efac29
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user