feat: user migration
This commit is contained in:
@@ -19,6 +19,7 @@ type UserFlavorType string
|
||||
|
||||
const (
|
||||
UserFlavorAll UserFlavorType = "all"
|
||||
UserFlavorFlink UserFlavorType = "flink"
|
||||
UserFlavorFull UserFlavorType = "full"
|
||||
UserFlavorLight UserFlavorType = "light"
|
||||
UserFlavorHeartRate UserFlavorType = "heartrate"
|
||||
@@ -87,6 +88,9 @@ func (u *User) SupportsFlavor(flavor string) bool {
|
||||
if u.FlavorType == UserFlavorAll {
|
||||
return true
|
||||
}
|
||||
if u.FlavorType == UserFlavorFlink {
|
||||
return flavor == string(UserFlavorFlink) || flavor == string(UserFlavorFull) || flavor == string(UserFlavorLight)
|
||||
}
|
||||
return string(u.FlavorType) == flavor
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user