Skip to content

Commit

Permalink
Don't expose lastUpdate and isUpdating
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin01 committed Oct 9, 2014
1 parent 3701b81 commit aef387a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
4 changes: 1 addition & 3 deletions lib/handlers/token/index.js
Expand Up @@ -15,9 +15,7 @@ module.exports.post = function tokenPost(req, res, next) {
anyfetchToken: req.params.access_token,
data: req.params.data || {},
cursor: req.params.cursor || null,
accountName: req.params.account_name || 'accountName',
isUpdating: req.params.is_updating || false,
lastUpdate: req.params.last_update || null
accountName: req.params.account_name || 'accountName'
});

async.waterfall([
Expand Down
10 changes: 2 additions & 8 deletions test/handlers/token/index.js
Expand Up @@ -20,9 +20,7 @@ describe('POST /token endpoint', function() {
foo: 'bar'
},
cursor: new Date(),
account_name: 'fake.test@anyfetch.com',
last_update: new Date(2020, 2, 2),
is_updating: true
account_name: 'fake.test@anyfetch.com'
};

before(AnyFetchProvider.debug.cleanTokens);
Expand Down Expand Up @@ -56,15 +54,11 @@ describe('POST /token endpoint', function() {
newToken.should.have.property('data', token.data);
newToken.should.have.property('cursor', token.cursor.toISOString());
newToken.should.have.property('accountName', token.account_name);
newToken.should.have.property('lastUpdate', token.last_update);
newToken.should.have.property('isUpdating', token.is_updating);

cb(null);
}
], done)
], done);
});

//Token.findOne({anyfetchToken: token.anyfetchToken}
});

describe('DELETE /token endpoint', function() {
Expand Down

0 comments on commit aef387a

Please sign in to comment.