Redirect users to "awaiting approval" message on register (#231)
Ref #81 - this implements a "your request has been sent" message  Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk> Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/231
This commit is contained in:
parent
105b934f90
commit
c01c62f149
12 changed files with 133 additions and 1506 deletions
|
@ -489,9 +489,17 @@ const users = {
|
|||
let data = await rootState.api.backendInteractor.register(
|
||||
{ params: { ...userInfo } }
|
||||
)
|
||||
store.commit('signUpSuccess')
|
||||
store.commit('setToken', data.access_token)
|
||||
store.dispatch('loginUser', data.access_token)
|
||||
if (data.identifier === 'awaiting_approval' || data.identifier === 'missing_confirmed_email') {
|
||||
store.commit('signUpSuccess')
|
||||
return data
|
||||
} else if (data.me !== undefined) {
|
||||
store.commit('signUpSuccess')
|
||||
store.commit('setToken', data.access_token)
|
||||
store.dispatch('loginUser', data.access_token)
|
||||
return data
|
||||
} else {
|
||||
store.commit('signUpFailure', data)
|
||||
}
|
||||
} catch (e) {
|
||||
let errors = e.message
|
||||
store.commit('signUpFailure', errors)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue