Fix saving of tags on users

This commit is contained in:
Eli Ribble 2026-04-02 15:25:51 +00:00
parent 945b482b00
commit af2299f417
No known key found for this signature in database
2 changed files with 12 additions and 3 deletions

View file

@ -48,6 +48,13 @@ func (res *userR) response(u *platform.User) (*user, error) {
if err != nil {
return nil, fmt.Errorf("id to uri: %w", err)
}
tags := make([]string, 0)
if u.IsDronePilot {
tags = append(tags, "drone pilot")
}
if u.IsWarrant {
tags = append(tags, "warrant")
}
return &user{
Avatar: omitnull.FromPtr(avatar),
DisplayName: omit.From(u.DisplayName),
@ -55,7 +62,7 @@ func (res *userR) response(u *platform.User) (*user, error) {
Initials: omit.From(u.Initials),
IsActive: omit.From(u.Active),
Role: omit.From(u.Role),
Tags: omit.From(u.Tags),
Tags: omit.From(tags),
URI: omit.From(uri),
Username: omit.From(u.Username),
}, nil