mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 02:28:10 +01:00
update scrub links
This commit is contained in:
parent
1a394d0a73
commit
f6d922e1b7
@ -118,37 +118,12 @@ new Vue({
|
||||
resetFormData() {
|
||||
this.formDialog = {
|
||||
show: false,
|
||||
fixedAmount: true,
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
updateScrubLink(wallet, data) {
|
||||
let values = _.omit(
|
||||
_.pick(
|
||||
data,
|
||||
'description',
|
||||
'min',
|
||||
'max',
|
||||
'webhook_url',
|
||||
'success_text',
|
||||
'success_url',
|
||||
'comment_chars',
|
||||
'currency'
|
||||
),
|
||||
(value, key) =>
|
||||
(key === 'webhook_url' ||
|
||||
key === 'success_text' ||
|
||||
key === 'success_url') &&
|
||||
(value === null || value === '')
|
||||
)
|
||||
|
||||
LNbits.api
|
||||
.request(
|
||||
'PUT',
|
||||
'/scrub/api/v1/links/' + data.id,
|
||||
wallet.adminkey,
|
||||
values
|
||||
)
|
||||
.request('PUT', '/scrub/api/v1/links/' + data.id, wallet.adminkey, data)
|
||||
.then(response => {
|
||||
this.payLinks = _.reject(this.payLinks, obj => obj.id === data.id)
|
||||
this.payLinks.push(mapScrubLink(response.data))
|
||||
|
@ -76,7 +76,6 @@ async def api_scrub_create_or_update(
|
||||
link_id=None,
|
||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
||||
):
|
||||
print("WAH")
|
||||
if link_id:
|
||||
link = await get_scrub_link(link_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user