@@ -25,7 +25,7 @@ export function loginUser(authOptions, code) {
2525 const { hostname } = authOptions ;
2626 const isEnterprise = hostname !== Constants . DEFAULT_AUTH_OPTIONS . hostname ;
2727
28- return dispatch => {
28+ return ( dispatch ) => {
2929 const url = `https://${ hostname } /login/oauth/access_token` ;
3030 const method = 'POST' ;
3131 const data = {
@@ -37,15 +37,15 @@ export function loginUser(authOptions, code) {
3737 dispatch ( { type : LOGIN . REQUEST } ) ;
3838
3939 return apiRequest ( url , method , data )
40- . then ( function ( response ) {
40+ . then ( function ( response ) {
4141 dispatch ( {
4242 type : LOGIN . SUCCESS ,
4343 payload : response . data ,
4444 isEnterprise,
4545 hostname,
4646 } ) ;
4747 } )
48- . catch ( function ( error ) {
48+ . catch ( function ( error ) {
4949 dispatch ( { type : LOGIN . FAILURE , payload : error . response . data } ) ;
5050 } ) ;
5151 } ;
@@ -77,7 +77,7 @@ export function fetchNotifications() {
7777
7878 function getEnterpriseNotifications ( ) {
7979 const enterpriseAccounts = getState ( ) . auth . enterpriseAccounts ;
80- return enterpriseAccounts . map ( account => {
80+ return enterpriseAccounts . map ( ( account ) => {
8181 const hostname = account . hostname ;
8282 const token = account . token ;
8383 const url = `https://${ hostname } /api/v3/${ endpointSuffix } ` ;
@@ -92,7 +92,7 @@ export function fetchNotifications() {
9292 . then (
9393 axios . spread ( ( gitHubNotifications , ...entAccNotifications ) => {
9494 const notifications = entAccNotifications . map (
95- accountNotifications => {
95+ ( accountNotifications ) => {
9696 const { hostname } = parse ( accountNotifications . config . url ) ;
9797
9898 return {
@@ -118,7 +118,7 @@ export function fetchNotifications() {
118118 } ) ;
119119 } )
120120 )
121- . catch ( error =>
121+ . catch ( ( error ) =>
122122 dispatch ( { type : NOTIFICATIONS . FAILURE , payload : error . response . data } )
123123 ) ;
124124 } ;
@@ -141,13 +141,13 @@ export function markNotification(id, hostname) {
141141 dispatch ( { type : MARK_NOTIFICATION . REQUEST } ) ;
142142
143143 return apiRequestAuth ( url , method , token , { } )
144- . then ( function ( response ) {
144+ . then ( function ( response ) {
145145 dispatch ( {
146146 type : MARK_NOTIFICATION . SUCCESS ,
147147 meta : { id, hostname } ,
148148 } ) ;
149149 } )
150- . catch ( function ( error ) {
150+ . catch ( function ( error ) {
151151 dispatch ( {
152152 type : MARK_NOTIFICATION . FAILURE ,
153153 payload : error . response . data ,
@@ -177,14 +177,14 @@ export function markRepoNotifications(repoSlug, hostname) {
177177 dispatch ( { type : MARK_REPO_NOTIFICATION . REQUEST } ) ;
178178
179179 return apiRequestAuth ( url , method , token , { } )
180- . then ( function ( response ) {
180+ . then ( function ( response ) {
181181 dispatch ( {
182182 type : MARK_REPO_NOTIFICATION . SUCCESS ,
183183 payload : response . data ,
184184 meta : { hostname, repoSlug } ,
185185 } ) ;
186186 } )
187- . catch ( function ( error ) {
187+ . catch ( function ( error ) {
188188 dispatch ( {
189189 type : MARK_REPO_NOTIFICATION . FAILURE ,
190190 payload : error . response . data ,
0 commit comments