Skip to content

Commit

Permalink
Avoid to hard-code the ROOT_URL with the link in the DB (#18)
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy committed Oct 14, 2024
1 parent bdd132d commit e322711
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions accessor/gitea/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ func (accessor *DefaultAccessor) GetUserEMailAddress(userName string) (string, e
return emailAddress, nil
}

// getUserRepoURL retrieves the URL of the current repository for the current user
// getUserRepoURL retrieves the relative URL of the current repository for the current user
func (accessor *DefaultAccessor) getUserRepoURL() string {
rootURL := accessor.GetStringConfig("server", "ROOT_URL")
return fmt.Sprintf("%s/%s/%s", rootURL, accessor.userName, accessor.repoName)
return fmt.Sprintf("/%s/%s", accessor.userName, accessor.repoName)
}

// MatchUser retrieves the name of the user best matching a user name or email address
Expand Down

0 comments on commit e322711

Please sign in to comment.