This commit is contained in:
MaysWind
2024-08-12 22:49:07 +08:00
parent b9ee94a47d
commit 8d27997e2e
+3 -3
View File
@@ -8,12 +8,12 @@ import (
const gravatarUrlFormat = "https://www.gravatar.com/avatar/%s" const gravatarUrlFormat = "https://www.gravatar.com/avatar/%s"
// GetInternalAvatarUrl returns the internal avatar url // GetInternalAvatarUrl returns the internal avatar url
func GetInternalAvatarUrl(uid int64, avatarFileExtesion string, webRootUrl string) string { func GetInternalAvatarUrl(uid int64, avatarFileExtension string, webRootUrl string) string {
if avatarFileExtesion == "" { if avatarFileExtension == "" {
return "" return ""
} }
return fmt.Sprintf("%savatar/%d.%s", webRootUrl, uid, avatarFileExtesion) return fmt.Sprintf("%savatar/%d.%s", webRootUrl, uid, avatarFileExtension)
} }
// GetGravatarUrl returns the Gravatar url according to the specified user email address // GetGravatarUrl returns the Gravatar url according to the specified user email address