diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-11-27 23:16:56 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-11-27 23:17:45 +0100 |
commit | 61a35066b64085d264fbd049e2a57f70125ca65a (patch) | |
tree | 6884d6de5def1622e50f3e6c83dda6792d66782f /store | |
parent | 192b606bc6da20b1148b14116de0a234814615c9 (diff) | |
download | chat-61a35066b64085d264fbd049e2a57f70125ca65a.tar.gz chat-61a35066b64085d264fbd049e2a57f70125ca65a.tar.bz2 chat-61a35066b64085d264fbd049e2a57f70125ca65a.zip |
rename 'featureToggle' to 'isFeatureEnable' and move definition of available prerelease-features to constants.jsx
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_preference_store.go | 4 | ||||
-rw-r--r-- | store/store.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/store/sql_preference_store.go b/store/sql_preference_store.go index 09546c872..f73dad3ac 100644 --- a/store/sql_preference_store.go +++ b/store/sql_preference_store.go @@ -280,7 +280,7 @@ func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) StoreChannel { return storeChannel } -func (s SqlPreferenceStore) FeatureToggle(feature, userId string) StoreChannel { +func (s SqlPreferenceStore) IsFeatureEnabled(feature, userId string) StoreChannel { storeChannel := make(StoreChannel) go func() { @@ -293,7 +293,7 @@ func (s SqlPreferenceStore) FeatureToggle(feature, userId string) StoreChannel { UserId = :UserId AND Category = :Category AND Name = :Name`, map[string]interface{}{"UserId": userId, "Category": model.PREFERENCE_CATEGORY_ADVANCED_SETTINGS, "Name": FEATURE_TOGGLE_PREFIX + feature}); err != nil { - result.Err = model.NewAppError("SqlPreferenceStore.featureToggle", "We encountered an error while finding a pre release feature preference", err.Error()) + result.Err = model.NewAppError("SqlPreferenceStore.IsFeatureEnabled", "We encountered an error while finding a pre release feature preference", err.Error()) } else { result.Data = value == "true" } diff --git a/store/store.go b/store/store.go index ef7dcde3a..0695ea27f 100644 --- a/store/store.go +++ b/store/store.go @@ -186,5 +186,5 @@ type PreferenceStore interface { GetCategory(userId string, category string) StoreChannel GetAll(userId string) StoreChannel PermanentDeleteByUser(userId string) StoreChannel - FeatureToggle(feature, userId string) StoreChannel + IsFeatureEnabled(feature, userId string) StoreChannel } |