Permalink
Browse files

Fix up options

  • Loading branch information...
1 parent dc652a0 commit 2b6083d1bdaee7df2b941ce622fca6bfa2076540 @coruscate coruscate committed Jan 17, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.js
View
@@ -257,14 +257,14 @@ exports.app = function(opts) {
var start, end;
if (opts.start && opts.start instanceof Date) start = opts.start.getTime();
- if (opts.start) qs.from = opts.start;
+ if (start) opts.from = opts.start;
if (opts.end && opts.end instanceof Date) end = opts.end.getTime();
- if (opts.end) qs.to = opts.end;
+ if (end) opts.to = opts.end;
var opts = {
url: uri + 'device/'+device+'/data',
method: 'GET',
- qs: _.extend(opts, {start: start, end: end}),
+ qs: opts,
json: true
};

0 comments on commit 2b6083d

Please sign in to comment.