Skip to content

Commit

Permalink
Refactor CreateBasicUser, CreateAdminUser, and CreateAUser functions …
Browse files Browse the repository at this point in the history
…to include BlackListedIP field
  • Loading branch information
waveyboym committed Oct 21, 2024
1 parent e682794 commit 620210c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions occupi-backend/pkg/database/database_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func CreateBasicUser(user models.RegisterUser) models.User {
NextVerificationDate: time.Now().In(time.Local), // this will be updated once the email is verified
TwoFAEnabled: false,
KnownLocations: []models.Location{},
BlackListedIP: []string{},
Details: models.Details{
HasImage: false,
Name: "",
Expand Down Expand Up @@ -67,6 +68,7 @@ func CreateAdminUser(user models.RegisterUser) models.User {
NextVerificationDate: time.Now().In(time.Local), // this will be updated once the email is verified
TwoFAEnabled: false,
KnownLocations: []models.Location{},
BlackListedIP: []string{},
Details: models.Details{
HasImage: false,
Name: "",
Expand Down Expand Up @@ -104,6 +106,7 @@ func CreateAUser(user models.UserRequest) models.User {
NextVerificationDate: time.Now().In(time.Local), // this will be updated once the email is verified
TwoFAEnabled: false,
KnownLocations: []models.Location{},
BlackListedIP: []string{},
Details: models.Details{
HasImage: false,
ContactNo: user.Details.ContactNo,
Expand Down

0 comments on commit 620210c

Please sign in to comment.