This repository was archived by the owner on Oct 10, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ module.exports = {
5
5
rules : {
6
6
// TODO: enable those rules
7
7
complexity : 0 ,
8
- 'consistent-this' : 0 ,
9
8
'id-length' : 0 ,
10
9
'line-comment-position' : 0 ,
11
10
'max-nested-callbacks' : 0 ,
Original file line number Diff line number Diff line change @@ -59,13 +59,11 @@ class NetlifyAPI {
59
59
async getAccessToken ( ticket , opts ) {
60
60
opts = { poll : 1000 , timeout : 3.6e6 , ...opts }
61
61
62
- const api = this
63
-
64
62
const { id } = ticket
65
63
66
64
let authorizedTicket // ticket capture
67
65
const checkTicket = async ( ) => {
68
- const t = await api . showTicket ( { ticketId : id } )
66
+ const t = await this . showTicket ( { ticketId : id } )
69
67
if ( t . authorized ) {
70
68
authorizedTicket = t
71
69
}
@@ -78,7 +76,7 @@ class NetlifyAPI {
78
76
message : 'Timeout while waiting for ticket grant' ,
79
77
} )
80
78
81
- const accessTokenResponse = await api . exchangeTicket ( { ticketId : authorizedTicket . id } )
79
+ const accessTokenResponse = await this . exchangeTicket ( { ticketId : authorizedTicket . id } )
82
80
// See https://open-api.netlify.com/#/default/exchangeTicket for shape
83
81
this . accessToken = accessTokenResponse . access_token
84
82
return accessTokenResponse . access_token
You can’t perform that action at this time.
0 commit comments