Skip to content

Commit

Permalink
fix: correct open sauced member created_at timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed Nov 11, 2022
1 parent 605b9da commit 89b5329
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/user/user.service.ts
Expand Up @@ -45,16 +45,14 @@ export class UserService {
const id = parseInt(github.id, 10);

try {
const publicUser = await this.findOneById(id);

return publicUser;
return await this.findOneById(id);
} catch (e) {
// create new user
const newUser = this.userRepository.create({
id,
is_open_sauced_member: false,
login: user_name as string,
created_at: new Date(github.created_at),
created_at: (new Date),
updated_at: new Date(github.updated_at ?? github.created_at),
});

Expand Down

0 comments on commit 89b5329

Please sign in to comment.