fix: remove trailing slash from admin.js

fixing 307 requests making a request to `/settings/`
This commit is contained in:
dni ⚡ 2024-04-04 07:54:21 +02:00 committed by Pavol Rusnak
parent 2066fff994
commit d64239f1ad

View file

@ -229,7 +229,7 @@ new Vue({
}, },
getAudit() { getAudit() {
LNbits.api LNbits.api
.request('GET', '/admin/api/v1/audit/', this.g.user.wallets[0].adminkey) .request('GET', '/admin/api/v1/audit', this.g.user.wallets[0].adminkey)
.then(response => { .then(response => {
this.auditData = response.data this.auditData = response.data
}) })
@ -241,7 +241,7 @@ new Vue({
LNbits.api LNbits.api
.request( .request(
'GET', 'GET',
'/admin/api/v1/settings/', '/admin/api/v1/settings',
this.g.user.wallets[0].adminkey this.g.user.wallets[0].adminkey
) )
.then(response => { .then(response => {
@ -262,7 +262,7 @@ new Vue({
LNbits.api LNbits.api
.request( .request(
'PUT', 'PUT',
'/admin/api/v1/settings/', '/admin/api/v1/settings',
this.g.user.wallets[0].adminkey, this.g.user.wallets[0].adminkey,
data data
) )
@ -290,7 +290,7 @@ new Vue({
.confirmDialog('Are you sure you want to restore settings to default?') .confirmDialog('Are you sure you want to restore settings to default?')
.onOk(() => { .onOk(() => {
LNbits.api LNbits.api
.request('DELETE', '/admin/api/v1/settings/') .request('DELETE', '/admin/api/v1/settings')
.then(response => { .then(response => {
this.$q.notify({ this.$q.notify({
type: 'positive', type: 'positive',
@ -306,7 +306,7 @@ new Vue({
}) })
}, },
downloadBackup() { downloadBackup() {
window.open('/admin/api/v1/backup/', '_blank') window.open('/admin/api/v1/backup', '_blank')
} }
} }
}) })