fix problems with rendering data

This commit is contained in:
Eric Hulburd
2016-02-21 18:40:55 -06:00
parent a84df34b55
commit c1fddd944e
28 changed files with 456 additions and 158 deletions

View File

@@ -5,15 +5,6 @@ import extend from 'extend';
class PowerDataApi {
static index(params){
params = extend({
}, params);
if (params.dates){
params.dates = params.dates.map((date_range)=>{
if (date_range[0]) date_range[0] = date_range[0].unix();
if (date_range[1]) date_range[1] = date_range[1].unix();
return [date_range[0], date_range[1]];
})
}
return jQuery.ajax({
url: ENDPOINT + '?' + jQuery.param(params),
type: 'GET',