Skip to content

Commit

Permalink
Merge pull request #291 from Quickchive/fix/#290-create-default-categ…
Browse files Browse the repository at this point in the history
…ory-after-user-created

fix: create category after user created
  • Loading branch information
stae1102 authored Mar 3, 2024
2 parents b6337d8 + c33383a commit 75eeb39
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/auth/oauth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 75eeb39

Please sign in to comment.