From 9fbbf0e735d3f6c24bc6440defd4f344c49cc237 Mon Sep 17 00:00:00 2001 From: Jeff Flynt Date: Thu, 1 Aug 2024 16:32:25 -0500 Subject: [PATCH] Fix Linting Issues --- lib/model/meteor-model.js | 2 +- lib/validation/requiredRefreshTokenPostParams.js | 2 +- tests/model-tests.js | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) 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) }) })