1
0
mirror of https://github.com/beestat/app.git synced 2025-06-01 04:37:12 -04:00

Removed metrics API call from non-early-access users

This commit is contained in:
Jon Ziebell 2020-03-04 20:37:44 -05:00
parent 97acf95180
commit a0b8b45057

View File

@ -35,17 +35,21 @@ beestat.comparisons.get_comparison_scores = function(callback) {
); );
}); });
api.add_call( if (beestat.user.has_early_access() === true) {
'thermostat_group', api.add_call(
'get_metrics', 'thermostat_group',
{ 'get_metrics',
'attributes': beestat.comparisons.get_comparison_attributes('resist') // todo {
}, 'attributes': beestat.comparisons.get_comparison_attributes('resist') // todo
'metrics' },
); 'metrics'
);
}
api.set_callback(function(data) { api.set_callback(function(data) {
beestat.cache.set('data.metrics', data.metrics); if (beestat.user.has_early_access() === true) {
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]);