fix: return absolute url for avatar in user sessions (#3724)

* fix: return absolute url for avatar in user sessions

* fix: refresh token unique constraint
This commit is contained in:
Livio Amstutz
2022-05-30 13:27:52 +02:00
committed by GitHub
parent e79aab3671
commit 41d78ef523
15 changed files with 43 additions and 85 deletions

View File

@@ -17,7 +17,7 @@ type Profile struct {
Gender Gender
PreferredLoginName string
LoginNames []string
AvatarURL string
AvatarKey string
}
func (p *Profile) IsValid() bool {

View File

@@ -18,7 +18,6 @@ type UserSessionView struct {
LoginName string
DisplayName string
AvatarKey string
AvatarURL string
SelectedIDPConfigID string
PasswordVerification time.Time
PasswordlessVerification time.Time

View File

@@ -37,7 +37,6 @@ type HumanView struct {
NickName string
DisplayName string
AvatarKey string
AvatarURL string
PreferredLanguage string
Gender Gender
Email string
@@ -249,7 +248,7 @@ func (u *UserView) GetProfile() (*Profile, error) {
Gender: u.Gender,
PreferredLoginName: u.PreferredLoginName,
LoginNames: u.LoginNames,
AvatarURL: u.AvatarURL,
AvatarKey: u.AvatarKey,
}, nil
}