Skip to content
Snippets Groups Projects
Commit 497176e5 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Merge branch 'feature/invites' of git.pleroma.social:linafilippova/admin-fe into feature/invites

parents 9fce1b2f 7b30e7f4
No related branches found
No related tags found
No related merge requests found
Pipeline #17499 passed
......@@ -14,14 +14,14 @@ const invites = {
state.newToken = token
},
SET_TOKENS: (state, tokens) => {
state.inviteTokens = tokens.reverse()
state.inviteTokens = tokens
}
},
actions: {
async FetchInviteTokens({ commit, getters }) {
commit('SET_LOADING', true)
const response = await listInviteTokens(getters.authHost, getters.token)
commit('SET_TOKENS', response.data.invites)
commit('SET_TOKENS', response.data.invites.reverse())
commit('SET_LOADING', false)
},
async GenerateInviteToken({ commit, dispatch, getters }, { maxUse, expiresAt }) {
......
......@@ -225,7 +225,7 @@ export default {
}
},
validEmail(email) {
var re = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
const re = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
return re.test(email)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment