Don't query database if patron id is empty

This commit is contained in:
Maksym Pavlenko
2017-11-02 22:53:14 -07:00
parent 622b9f4dd0
commit ef65673645
+4
View File
@@ -93,6 +93,10 @@ func (h Patreon) FindPledge(patronID string) (*model.Pledge, error) {
func (h Patreon) GetFeatureLevel(patronID string) (level int) {
level = api.DefaultFeatures
if patronID == "" {
return
}
if patronID == creatorID {
level = api.PodcasterFeature
return