Fix back-end paths called by Vue front-end

This commit is contained in:
Bubka 2022-03-24 15:03:45 +01:00
parent d016507592
commit 4fcfcc6797
5 changed files with 6 additions and 6 deletions

View File

@ -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 })

View File

@ -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 })

View File

@ -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 })

View File

@ -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') })

View File

@ -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 } });