@@ -25,7 +25,7 @@ export function loginUser(authOptions, code) {
25
25
const { hostname } = authOptions ;
26
26
const isEnterprise = hostname !== Constants . DEFAULT_AUTH_OPTIONS . hostname ;
27
27
28
- return dispatch => {
28
+ return ( dispatch ) => {
29
29
const url = `https://${ hostname } /login/oauth/access_token` ;
30
30
const method = 'POST' ;
31
31
const data = {
@@ -37,15 +37,15 @@ export function loginUser(authOptions, code) {
37
37
dispatch ( { type : LOGIN . REQUEST } ) ;
38
38
39
39
return apiRequest ( url , method , data )
40
- . then ( function ( response ) {
40
+ . then ( function ( response ) {
41
41
dispatch ( {
42
42
type : LOGIN . SUCCESS ,
43
43
payload : response . data ,
44
44
isEnterprise,
45
45
hostname,
46
46
} ) ;
47
47
} )
48
- . catch ( function ( error ) {
48
+ . catch ( function ( error ) {
49
49
dispatch ( { type : LOGIN . FAILURE , payload : error . response . data } ) ;
50
50
} ) ;
51
51
} ;
@@ -77,7 +77,7 @@ export function fetchNotifications() {
77
77
78
78
function getEnterpriseNotifications ( ) {
79
79
const enterpriseAccounts = getState ( ) . auth . enterpriseAccounts ;
80
- return enterpriseAccounts . map ( account => {
80
+ return enterpriseAccounts . map ( ( account ) => {
81
81
const hostname = account . hostname ;
82
82
const token = account . token ;
83
83
const url = `https://${ hostname } /api/v3/${ endpointSuffix } ` ;
@@ -92,7 +92,7 @@ export function fetchNotifications() {
92
92
. then (
93
93
axios . spread ( ( gitHubNotifications , ...entAccNotifications ) => {
94
94
const notifications = entAccNotifications . map (
95
- accountNotifications => {
95
+ ( accountNotifications ) => {
96
96
const { hostname } = parse ( accountNotifications . config . url ) ;
97
97
98
98
return {
@@ -118,7 +118,7 @@ export function fetchNotifications() {
118
118
} ) ;
119
119
} )
120
120
)
121
- . catch ( error =>
121
+ . catch ( ( error ) =>
122
122
dispatch ( { type : NOTIFICATIONS . FAILURE , payload : error . response . data } )
123
123
) ;
124
124
} ;
@@ -141,13 +141,13 @@ export function markNotification(id, hostname) {
141
141
dispatch ( { type : MARK_NOTIFICATION . REQUEST } ) ;
142
142
143
143
return apiRequestAuth ( url , method , token , { } )
144
- . then ( function ( response ) {
144
+ . then ( function ( response ) {
145
145
dispatch ( {
146
146
type : MARK_NOTIFICATION . SUCCESS ,
147
147
meta : { id, hostname } ,
148
148
} ) ;
149
149
} )
150
- . catch ( function ( error ) {
150
+ . catch ( function ( error ) {
151
151
dispatch ( {
152
152
type : MARK_NOTIFICATION . FAILURE ,
153
153
payload : error . response . data ,
@@ -177,14 +177,14 @@ export function markRepoNotifications(repoSlug, hostname) {
177
177
dispatch ( { type : MARK_REPO_NOTIFICATION . REQUEST } ) ;
178
178
179
179
return apiRequestAuth ( url , method , token , { } )
180
- . then ( function ( response ) {
180
+ . then ( function ( response ) {
181
181
dispatch ( {
182
182
type : MARK_REPO_NOTIFICATION . SUCCESS ,
183
183
payload : response . data ,
184
184
meta : { hostname, repoSlug } ,
185
185
} ) ;
186
186
} )
187
- . catch ( function ( error ) {
187
+ . catch ( function ( error ) {
188
188
dispatch ( {
189
189
type : MARK_REPO_NOTIFICATION . FAILURE ,
190
190
payload : error . response . data ,
0 commit comments