Skip to content

Commit

Permalink
docs(queries.GetProfile): add comment on query condition
Browse files Browse the repository at this point in the history
Co-authored-by: Sizhe Zhao <[email protected]>
  • Loading branch information
AstatineAi and Prince213 authored May 20, 2024
1 parent 89149e8 commit 6c69acf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/queries/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ func GetProfile(db *gorm.DB, queriedUserID uint, queryingUserID uint) (models.Pr
displayInvitationCode := queryingUserID == queriedUserID
displayReward := queryingUserID == queriedUserID

// don't query if not logged in
if queryingUserID != 0 && queryingUserID != queriedUserID {
queryingUser, err := GetUserByID(db, queryingUserID)
if err != nil {
Expand Down

0 comments on commit 6c69acf

Please sign in to comment.