diff --git a/lib/model/meteor-model.js b/lib/model/meteor-model.js index 74d143e..06b6c57 100644 --- a/lib/model/meteor-model.js +++ b/lib/model/meteor-model.js @@ -158,4 +158,4 @@ export const getRefreshToken = async (refreshToken) => { export const revokeToken = async (token) => { const result = await collections.AccessTokens.removeAsync({ refreshToken: token.refreshToken }) return !!result -} \ No newline at end of file +} diff --git a/lib/validation/requiredRefreshTokenPostParams.js b/lib/validation/requiredRefreshTokenPostParams.js index fd6b794..59588fc 100644 --- a/lib/validation/requiredRefreshTokenPostParams.js +++ b/lib/validation/requiredRefreshTokenPostParams.js @@ -8,4 +8,4 @@ export const requiredRefreshTokenPostParams = { refresh_token: isNonEmptyString, client_id: Match.Maybe(String), client_secret: Match.Maybe(String) -} \ No newline at end of file +} diff --git a/tests/model-tests.js b/tests/model-tests.js index 6567159..8ecd194 100644 --- a/tests/model-tests.js +++ b/tests/model-tests.js @@ -232,14 +232,13 @@ describe('model', function () { const collection = Mongo.Collection.get(DefaultModelConfig.accessTokensCollectionName) const refreshToken = Random.id() await collection.insertAsync({ refreshToken }) - const tokenDoc = await model.revokeToken({refreshToken}) + const tokenDoc = await model.revokeToken({ refreshToken }) assert.isTrue(tokenDoc) }) it('returns false if the refresh token was not found', async () => { - const collection = Mongo.Collection.get(DefaultModelConfig.accessTokensCollectionName) const refreshToken = Random.id() - const tokenDoc = await model.revokeToken({refreshToken}) + const tokenDoc = await model.revokeToken({ refreshToken }) assert.isFalse(tokenDoc) }) })