Skip to content
Snippets Groups Projects

Generate invite tokens from admin-fe

Merged Angelina Filippova requested to merge linafilippova/admin-fe:feature/invites into master
All threads resolved!
2 files
+ 37
23
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 10
6
@@ -13,7 +13,10 @@ const users = {
active: false,
deactivated: false
},
passwordResetToken: ''
passwordResetToken: {
token: '',
link: ''
}
},
mutations: {
SET_USERS: (state, users) => {
@@ -46,8 +49,9 @@ const users = {
SET_PAGE_SIZE: (state, pageSize) => {
state.pageSize = pageSize
},
SET_PASSWORD_RESET_TOKEN: (state, token) => {
state.passwordResetToken = token
SET_PASSWORD_RESET_TOKEN: (state, { token, link }) => {
state.passwordResetToken.token = token
state.passwordResetToken.link = link
},
SET_SEARCH_QUERY: (state, query) => {
state.searchQuery = query
@@ -86,11 +90,11 @@ const users = {
loadUsers(commit, page, response.data)
},
async GetPasswordResetToken({ commit, state, getters }, nickname) {
const response = await getPasswordResetToken(nickname, getters.authHost, getters.token)
commit('SET_PASSWORD_RESET_TOKEN', response.data)
const { data } = await getPasswordResetToken(nickname, getters.authHost, getters.token)
commit('SET_PASSWORD_RESET_TOKEN', data)
},
RemovePasswordToken({ commit }) {
commit('SET_PASSWORD_RESET_TOKEN', '')
commit('SET_PASSWORD_RESET_TOKEN', { link: '', token: '' })
},
async RemoveTag({ commit, getters }, { users, tag }) {
const nicknames = users.map(user => user.nickname)
Loading