Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use registry for getting the access token #2287

Merged
merged 1 commit into from
Aug 22, 2019
Merged

Conversation

yann300
Copy link
Collaborator

@yann300 yann300 commented Aug 22, 2019

No description provided.

@@ -1,4 +1,5 @@
'use strict'
let globalRegistry = require('../../global/registry')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use const here


param += this.githubAccessToken() ? 'access_token=' + this.githubAccessToken() : ''
// const token = await this.call('settings', 'getGithubAccessToken')
const token = globalRegistry.get('config').api.get('settings/gist-access-token') // TODO replace with the plugin call above
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create an issue for that and reference it in the TODO statement ?

param += this.githubAccessToken() ? 'access_token=' + this.githubAccessToken() : ''
// const token = await this.call('settings', 'getGithubAccessToken')
const token = globalRegistry.get('config').api.get('settings/gist-access-token') // TODO replace with the plugin call above
param += token ? 'access_token=' + token : ''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe more readable to do :

const param = token ? `?access_token=${token}` : '?' 

(or "let param = ..." if you're mutating the param later.

@yann300 yann300 merged commit 8ed88cc into master Aug 22, 2019
@yann300 yann300 deleted the fixListeningOnVyper branch September 29, 2019 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants