mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-05-19 13:40:50 +02:00
Fix back-end paths called by Vue front-end
This commit is contained in:
parent
d016507592
commit
4fcfcc6797
@ -23,7 +23,7 @@
|
||||
handleSubmit(e) {
|
||||
e.preventDefault()
|
||||
|
||||
this.form.post('/api/v1/user/password/lost', {returnError: true})
|
||||
this.form.post('/user/password/lost', {returnError: true})
|
||||
.then(response => {
|
||||
|
||||
this.$notify({ type: 'is-success', text: response.data.message, duration:-1 })
|
||||
|
@ -36,7 +36,7 @@
|
||||
handleSubmit(e) {
|
||||
e.preventDefault()
|
||||
|
||||
this.form.post('/api/v1/user/password/reset', {returnError: true})
|
||||
this.form.post('/user/password/reset', {returnError: true})
|
||||
.then(response => {
|
||||
|
||||
this.$notify({ type: 'is-success', text: response.data.message, duration:-1 })
|
||||
|
@ -68,7 +68,7 @@
|
||||
submitProfile(e) {
|
||||
e.preventDefault()
|
||||
|
||||
this.formProfile.put('/api/v1/user', {returnError: true})
|
||||
this.formProfile.put('/user', {returnError: true})
|
||||
.then(response => {
|
||||
this.$notify({ type: 'is-success', text: this.$t('auth.forms.profile_saved') })
|
||||
})
|
||||
@ -86,7 +86,7 @@
|
||||
submitPassword(e) {
|
||||
e.preventDefault()
|
||||
|
||||
this.formPassword.patch('/api/v1/user/password', {returnError: true})
|
||||
this.formPassword.patch('/user/password', {returnError: true})
|
||||
.then(response => {
|
||||
|
||||
this.$notify({ type: 'is-success', text: response.data.message })
|
||||
|
@ -123,7 +123,7 @@
|
||||
async revokeToken(tokenId) {
|
||||
if(confirm(this.$t('settings.confirm.revoke'))) {
|
||||
|
||||
await this.axios.delete('/api/v1/oauth/personal-access-tokens/' + tokenId).then(response => {
|
||||
await this.axios.delete('/oauth/personal-access-tokens/' + tokenId).then(response => {
|
||||
// Remove the revoked token from the collection
|
||||
this.tokens = this.tokens.filter(a => a.id !== tokenId)
|
||||
this.$notify({ type: 'is-success', text: this.$t('settings.token_revoked') })
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
async generatePAToken() {
|
||||
|
||||
const { data } = await this.form.post('/api/v1/oauth/personal-access-tokens')
|
||||
const { data } = await this.form.post('/oauth/personal-access-tokens')
|
||||
|
||||
if( this.form.errors.any() === false ) {
|
||||
this.$router.push({ name: 'settings.oauth', params: { accessToken: data.accessToken, token_id: data.token.id } });
|
||||
|
Loading…
Reference in New Issue
Block a user