Skip to content

Commit

Permalink
Fix minor error
Browse files Browse the repository at this point in the history
Signed-off-by: William <[email protected]>
  • Loading branch information
kwesidev committed Aug 20, 2024
1 parent ff7469c commit 1b965e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/services/user_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func (usrSrv *userService) Register(userRegistrationRequest models.UserRegistrat
return false, err
}
tx, err := usrSrv.db.Begin()
if err != nil {
log.Println("Failed to start transaction")
return false, ErrRegistration
}
defer tx.Rollback()
queryString := `
INSERT INTO users
Expand Down

0 comments on commit 1b965e7

Please sign in to comment.