From 4fcfcc6797bebf544c588b2f6a07cf6f10b13bcc Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Thu, 24 Mar 2022 15:03:45 +0100 Subject: [PATCH] Fix back-end paths called by Vue front-end --- resources/js/views/auth/password/Request.vue | 2 +- resources/js/views/auth/password/Reset.vue | 2 +- resources/js/views/settings/Account.vue | 4 ++-- resources/js/views/settings/OAuth.vue | 2 +- resources/js/views/settings/PATokens/Create.vue | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/js/views/auth/password/Request.vue b/resources/js/views/auth/password/Request.vue index 18967531..92fcd463 100644 --- a/resources/js/views/auth/password/Request.vue +++ b/resources/js/views/auth/password/Request.vue @@ -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 }) diff --git a/resources/js/views/auth/password/Reset.vue b/resources/js/views/auth/password/Reset.vue index edd018d4..ebcad42e 100644 --- a/resources/js/views/auth/password/Reset.vue +++ b/resources/js/views/auth/password/Reset.vue @@ -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 }) diff --git a/resources/js/views/settings/Account.vue b/resources/js/views/settings/Account.vue index a1266600..5650f1d2 100644 --- a/resources/js/views/settings/Account.vue +++ b/resources/js/views/settings/Account.vue @@ -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 }) diff --git a/resources/js/views/settings/OAuth.vue b/resources/js/views/settings/OAuth.vue index 9554fe78..c9db9de6 100644 --- a/resources/js/views/settings/OAuth.vue +++ b/resources/js/views/settings/OAuth.vue @@ -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') }) diff --git a/resources/js/views/settings/PATokens/Create.vue b/resources/js/views/settings/PATokens/Create.vue index 03775234..c17a3bc5 100644 --- a/resources/js/views/settings/PATokens/Create.vue +++ b/resources/js/views/settings/PATokens/Create.vue @@ -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 } });