diff options
| author | Shpuld Shpludson <shp@cock.li> | 2019-07-07 19:12:33 +0000 |
|---|---|---|
| committer | Shpuld Shpludson <shp@cock.li> | 2019-07-07 19:12:33 +0000 |
| commit | 54b0f9013388b24769c587abbf7ca76849ce9570 (patch) | |
| tree | 2b1ff13b76993b88a384ae8d001e599493ab154c /src/modules/users.js | |
| parent | 171673113fd353666ae9b593abec8f64ec9ea6ef (diff) | |
| parent | 020c6d1bcfaf67ccb9ecdab13a39a1ddea868bb6 (diff) | |
Merge branch 'eslint-fix' into 'develop'
Fix shitton warning eslint gives
See merge request pleroma/pleroma-fe!871
Diffstat (limited to 'src/modules/users.js')
| -rw-r--r-- | src/modules/users.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/users.js b/src/modules/users.js index dd3a8f3c..6c7a96f6 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -347,8 +347,8 @@ const users = { const notificationsObject = store.rootState.statuses.notifications.idStore const relevantNotifications = Object.entries(notificationsObject) - .filter(([k, val]) => notificationIds.includes(k)) - .map(([k, val]) => val) + .filter(([k, val]) => notificationIds.includes(k)) + .map(([k, val]) => val) // Reconnect users to notifications each(relevantNotifications, (notification) => { @@ -394,7 +394,7 @@ const users = { } }, async getCaptcha (store) { - return await store.rootState.api.backendInteractor.getCaptcha() + return store.rootState.api.backendInteractor.getCaptcha() }, logout (store) { @@ -472,19 +472,19 @@ const users = { // Authentication failed commit('endLogin') if (response.status === 401) { - reject('Wrong username or password') + reject(new Error('Wrong username or password')) } else { - reject('An error occurred, please try again') + reject(new Error('An error occurred, please try again')) } } commit('endLogin') resolve() }) - .catch((error) => { - console.log(error) - commit('endLogin') - reject('Failed to connect to server, try again') - }) + .catch((error) => { + console.log(error) + commit('endLogin') + reject(new Error('Failed to connect to server, try again')) + }) }) } } |
