update scrub links

This commit is contained in:
Tiago vasconcelos 2022-06-17 12:33:14 +01:00
parent 1a394d0a73
commit f6d922e1b7
2 changed files with 1 additions and 27 deletions

View File

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

View File

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