aboutsummaryrefslogtreecommitdiff
path: root/src/modules/users.js
diff options
context:
space:
mode:
authorSean King <seanking2919@protonmail.com>2022-08-01 18:17:09 -0600
committerSean King <seanking2919@protonmail.com>2022-08-01 18:17:09 -0600
commit081aa0fd0552732f208bd35e37cde06c66536791 (patch)
tree053827cd9d9b258d6752195ab09eabd37d4c813b /src/modules/users.js
parent75216c5feb32b32e24952663ffa4233410585785 (diff)
parent3fc9673a7d0fb851283e4ed687c2fd7790f03317 (diff)
Fix merge conflicts
Diffstat (limited to 'src/modules/users.js')
-rw-r--r--src/modules/users.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/users.js b/src/modules/users.js
index f951483f..13d4e318 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -103,23 +103,23 @@ export const mutations = {
const user = state.usersObject[id]
const tags = user.tags || []
const newTags = tags.concat([tag])
- user['tags'] = newTags
+ user.tags = newTags
},
untagUser (state, { user: { id }, tag }) {
const user = state.usersObject[id]
const tags = user.tags || []
const newTags = tags.filter(t => t !== tag)
- user['tags'] = newTags
+ user.tags = newTags
},
updateRight (state, { user: { id }, right, value }) {
const user = state.usersObject[id]
- let newRights = user.rights
+ const newRights = user.rights
newRights[right] = value
- user['rights'] = newRights
+ user.rights = newRights
},
updateActivationStatus (state, { user: { id }, deactivated }) {
const user = state.usersObject[id]
- user['deactivated'] = deactivated
+ user.deactivated = deactivated
},
setCurrentUser (state, user) {
state.lastLoginName = user.screen_name
@@ -148,13 +148,13 @@ export const mutations = {
clearFriends (state, userId) {
const user = state.usersObject[userId]
if (user) {
- user['friendIds'] = []
+ user.friendIds = []
}
},
clearFollowers (state, userId) {
const user = state.usersObject[userId]
if (user) {
- user['followerIds'] = []
+ user.followerIds = []
}
},
addNewUsers (state, users) {
@@ -222,7 +222,7 @@ export const mutations = {
},
setColor (state, { user: { id }, highlighted }) {
const user = state.usersObject[id]
- user['highlight'] = highlighted
+ user.highlight = highlighted
},
signUpPending (state) {
state.signUpPending = true
@@ -393,7 +393,7 @@ const users = {
toggleActivationStatus ({ rootState, commit }, { user }) {
const api = user.deactivated ? rootState.api.backendInteractor.activateUser : rootState.api.backendInteractor.deactivateUser
api({ user })
- .then((user) => { let deactivated = !user.is_active; commit('updateActivationStatus', { user, deactivated }) })
+ .then((user) => { const deactivated = !user.is_active; commit('updateActivationStatus', { user, deactivated }) })
},
registerPushNotifications (store) {
const token = store.state.currentUser.credentials
@@ -457,17 +457,17 @@ const users = {
async signUp (store, userInfo) {
store.commit('signUpPending')
- let rootState = store.rootState
+ const rootState = store.rootState
try {
- let data = await rootState.api.backendInteractor.register(
+ const data = await rootState.api.backendInteractor.register(
{ params: { ...userInfo } }
)
store.commit('signUpSuccess')
store.commit('setToken', data.access_token)
store.dispatch('loginUser', data.access_token)
} catch (e) {
- let errors = e.message
+ const errors = e.message
store.commit('signUpFailure', errors)
throw e
}