Skip to content

Commit

Permalink
Merge branch 'dev' into feat/create-invite-token
Browse files Browse the repository at this point in the history
  • Loading branch information
NwokoyeChigozie authored Jul 26, 2024
2 parents 7655de0 + 4eba76b commit 04d497a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ func CreateAdmin(req models.CreateUserRequestModel, db *gorm.DB) (gin.H, int, er
"role": models.AdminRoleName,
"expires_in": tokenData.ExpiresAt.Unix(),
"access_token": tokenData.AccessToken,
"created_at": user.CreatedAt,
"updated_at": user.UpdatedAt,
}

return responseData, http.StatusCreated, nil
Expand Down Expand Up @@ -248,6 +250,8 @@ func LoginUser(req models.LoginRequestModel, db *gorm.DB) (gin.H, int, error) {
"role": userData.Role,
"expires_in": tokenData.ExpiresAt.Unix(),
"access_token": tokenData.AccessToken,
"created_at": userData.CreatedAt,
"updated_at": userData.UpdatedAt,
}

return responseData, http.StatusOK, nil
Expand Down

0 comments on commit 04d497a

Please sign in to comment.