Skip to content

Commit

Permalink
no cache added to GET /user/submissions
Browse files Browse the repository at this point in the history
  • Loading branch information
elifceren committed Feb 5, 2016
1 parent b028b6a commit daa6f4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ exports.getForms = function(query){

exports.getSubmissions = function(query){

var filter, offset, limit, orderby, direction, fullText;
var filter, offset, limit, orderby, direction, fullText, nocache;
if (query && typeof query === 'object') {
if (typeof query.filter === 'object' || query.filter) { filter = query.filter || filter; }
offset = query.offset || offset;
limit = query.limit || limit;
orderby = query.orderby || orderby;
if (query.direction === 'ASC' || query.direction === 'DESC') { direction = query.direction || direction; }
fullText = query.fullText || fullText;
nocache = query.nocache || nocache;
}

var deferred = Q.defer()
Expand All @@ -124,7 +125,8 @@ exports.getSubmissions = function(query){
+_apiKey + (filter !== undefined ? "&filter=" + JSON.stringify(filter) : "") +
(offset !== undefined ? "&offset=" + offset : "") +
(limit !== undefined ? "&limit=" + limit : "") +
(orderby !== undefined ? "&orderby=" + orderby : "&orderby=created_at") +
(orderby !== undefined ? "&orderby=" + orderby : "&orderby=created_at") +
(nocache !== undefined ? "&nocache=" + nocache : "") +
(direction !== undefined ? "," + direction : "")
, requestVerb = "get";
sendRequest(deferred, requestUrl, requestVerb);
Expand Down

0 comments on commit daa6f4b

Please sign in to comment.