fix: restore default exchanges (#3613)
Co-authored-by: dni ⚡ <office@dnilabs.com>
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -173,5 +173,10 @@ window._lnbitsApi = {
|
|||||||
return this.request('GET', '/api/v1/currencies').then(response => {
|
return this.request('GET', '/api/v1/currencies').then(response => {
|
||||||
return ['sats', ...response.data]
|
return ['sats', ...response.data]
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getDefaultSetting(fieldName) {
|
||||||
|
return LNbits.api
|
||||||
|
.request('GET', `/admin/api/v1/settings/default?field_name=${fieldName}`)
|
||||||
|
.catch(LNbits.utils.notifyApiError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,11 @@ window.app.component('lnbits-admin-exchange-providers', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDefaultSetting(fieldName) {
|
||||||
|
LNbits.api.getDefaultSetting(fieldName).then(response => {
|
||||||
|
this.formData[fieldName] = response.data.default_value
|
||||||
|
})
|
||||||
|
},
|
||||||
getExchangeRateHistory() {
|
getExchangeRateHistory() {
|
||||||
LNbits.api
|
LNbits.api
|
||||||
.request('GET', '/api/v1/rate/history', this.g.user.wallets[0].inkey)
|
.request('GET', '/api/v1/rate/history', this.g.user.wallets[0].inkey)
|
||||||
|
|||||||
@@ -38,17 +38,9 @@ window.PageAdmin = {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDefaultSetting(fieldName) {
|
getDefaultSetting(fieldName) {
|
||||||
LNbits.api
|
LNbits.api.getDefaultSetting(fieldName).then(response => {
|
||||||
.request(
|
this.formData[fieldName] = response.data.default_value
|
||||||
'GET',
|
})
|
||||||
`/admin/api/v1/settings/default?field_name=${fieldName}`
|
|
||||||
)
|
|
||||||
.then(response => {
|
|
||||||
this.formData[fieldName] = response.data.default_value
|
|
||||||
})
|
|
||||||
.catch(function (error) {
|
|
||||||
LNbits.utils.notifyApiError(error)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
restartServer() {
|
restartServer() {
|
||||||
LNbits.api
|
LNbits.api
|
||||||
|
|||||||
Reference in New Issue
Block a user