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 Jul 2, 2024
1 parent 42f731e commit 47d14e3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions lib/model/meteor-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const saveAuthorizationCode = bind(function saveAuthCode (code, client, u
redirectUri,
scope: code.scope,
client: {
id: client.client_id
id: client.clientId
},
user: {
id: user.id
Expand Down Expand Up @@ -151,10 +151,10 @@ export const getRefreshToken = bind(function (refreshToken) {
})

export const revokeToken = bind(function (token) {
const docCount = collections.AccessTokens.find({ refreshToken: token.refreshToken }).count();
const docCount = collections.AccessTokens.find({ refreshToken: token.refreshToken }).count()
if (docCount === 0) {
return true;
return true
}

return collections.AccessTokens.remove({ refreshToken: token.refreshToken }) === docCount;
return collections.AccessTokens.remove({ refreshToken: token.refreshToken }) === docCount
})
2 changes: 1 addition & 1 deletion lib/model/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class OAuthMeteorModel {
/**
* revokeToken(refreshToken) is required and should return true
*/
async revokeToken(refreshToken) {
async revokeToken (refreshToken) {
this.log(`revokeToken (refreshToken: ${refreshToken})`)
return revokeToken(refreshToken)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { validateParams } from './validation/validateParams'
import { requiredAuthorizeGetParams } from './validation/requiredAuthorizeGetParams'
import { requiredAuthorizePostParams } from './validation/requiredAuthorizePostParams'
import { requiredAccessTokenPostParams } from './validation/requiredAccessTokenPostParams'
import { requiredRefreshTokenPostParams } from "./validation/requiredRefreshTokenPostParams";
import { requiredRefreshTokenPostParams } from './validation/requiredRefreshTokenPostParams';

Check failure on line 20 in lib/oauth.js

View workflow job for this annotation

GitHub Actions / StandardJS lint

Extra semicolon
import { UserValidation } from './validation/UserValidation'
import { OptionsSchema } from './validation/OptionsSchema'

Expand Down
10 changes: 5 additions & 5 deletions lib/validation/requiredRefreshTokenPostParams.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Match } from "meteor/check";
import { nonEmptyString } from "./nonEmptyString";
import { Match } from 'meteor/check'
import { nonEmptyString } from './nonEmptyString'

const isNonEmptyString = Match.Where(nonEmptyString);
const isNonEmptyString = Match.Where(nonEmptyString)

export const requiredRefreshTokenPostParams = {
grant_type: isNonEmptyString,
refresh_token: isNonEmptyString,
client_id: Match.Maybe(String),
client_secret: Match.Maybe(String),
};
client_secret: Match.Maybe(String)
}

0 comments on commit 47d14e3

Please sign in to comment.