arimelody.me/music/model/artist.go
ari melody 10f19d46db release edit page! + a lot of other stuff oml
Signed-off-by: ari melody <ari@arimelody.me>
2024-08-31 01:52:39 +01:00

22 lines
384 B
Go

package model
type (
Artist struct {
ID string `json:"id"`
Name string `json:"name"`
Website string `json:"website"`
Avatar string `json:"avatar"`
}
)
func (artist Artist) GetWebsite() string {
return artist.Website
}
func (artist Artist) GetAvatar() string {
if artist.Avatar == "" {
return "/img/default-avatar.png"
}
return artist.Avatar
}