From c33383ae6f2e4b216998b16ff516999850a5d23b Mon Sep 17 00:00:00 2001 From: stae1102 Date: Sun, 3 Mar 2024 16:00:13 +0900 Subject: [PATCH] fix: create category after user created --- src/auth/oauth.service.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/auth/oauth.service.ts b/src/auth/oauth.service.ts index fa73b32..8f759a6 100644 --- a/src/auth/oauth.service.ts +++ b/src/auth/oauth.service.ts @@ -106,10 +106,8 @@ export class OAuthService { process.env.KAKAO_JS_KEY, ); - await Promise.all([ - this.userRepository.createOne(user), - this.categoryRepository.createDefaultCategories(user), - ]); + await this.userRepository.createOne(user); + await this.categoryRepository.createDefaultCategories(user); } return this.oauthLogin(user.email); @@ -138,10 +136,8 @@ export class OAuthService { process.env.GOOGLE_CLIENT_ID, ); - await Promise.all([ - this.userRepository.createOne(user), - this.categoryRepository.createDefaultCategories(user), - ]); + await this.userRepository.createOne(user); + await this.categoryRepository.createDefaultCategories(user); } return this.oauthLogin(user.email);