mirror of
https://github.com/beestat/app.git
synced 2025-06-02 21:26:38 -04:00
Removed metrics API call from non-early-access users
This commit is contained in:
parent
97acf95180
commit
a0b8b45057
@ -35,6 +35,7 @@ beestat.comparisons.get_comparison_scores = function(callback) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (beestat.user.has_early_access() === true) {
|
||||||
api.add_call(
|
api.add_call(
|
||||||
'thermostat_group',
|
'thermostat_group',
|
||||||
'get_metrics',
|
'get_metrics',
|
||||||
@ -43,9 +44,12 @@ beestat.comparisons.get_comparison_scores = function(callback) {
|
|||||||
},
|
},
|
||||||
'metrics'
|
'metrics'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
api.set_callback(function(data) {
|
api.set_callback(function(data) {
|
||||||
|
if (beestat.user.has_early_access() === true) {
|
||||||
beestat.cache.set('data.metrics', data.metrics);
|
beestat.cache.set('data.metrics', data.metrics);
|
||||||
|
}
|
||||||
|
|
||||||
types.forEach(function(type) {
|
types.forEach(function(type) {
|
||||||
beestat.cache.set('data.comparison_scores_' + type, data['score_' + type]);
|
beestat.cache.set('data.comparison_scores_' + type, data['score_' + type]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user