Explorar o código

Fix back-end paths called by Vue front-end

Bubka %!s(int64=3) %!d(string=hai) anos
pai
achega
4fcfcc6797

+ 1 - 1
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 })

+ 1 - 1
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 })

+ 2 - 2
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 })

+ 1 - 1
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') })

+ 1 - 1
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 } });