Skip to content

Commit

Permalink
Fix Linting Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Flynt committed Aug 1, 2024
1 parent 3ba0c44 commit 9fbbf0e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/model/meteor-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
2 changes: 1 addition & 1 deletion lib/validation/requiredRefreshTokenPostParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export const requiredRefreshTokenPostParams = {
refresh_token: isNonEmptyString,
client_id: Match.Maybe(String),
client_secret: Match.Maybe(String)
}
}
5 changes: 2 additions & 3 deletions tests/model-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
})
Expand Down

0 comments on commit 9fbbf0e

Please sign in to comment.