update scrub links
This commit is contained in:
parent
1a394d0a73
commit
f6d922e1b7
2 changed files with 1 additions and 27 deletions
|
|
@ -118,37 +118,12 @@ new Vue({
|
||||||
resetFormData() {
|
resetFormData() {
|
||||||
this.formDialog = {
|
this.formDialog = {
|
||||||
show: false,
|
show: false,
|
||||||
fixedAmount: true,
|
|
||||||
data: {}
|
data: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateScrubLink(wallet, 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
|
LNbits.api
|
||||||
.request(
|
.request('PUT', '/scrub/api/v1/links/' + data.id, wallet.adminkey, data)
|
||||||
'PUT',
|
|
||||||
'/scrub/api/v1/links/' + data.id,
|
|
||||||
wallet.adminkey,
|
|
||||||
values
|
|
||||||
)
|
|
||||||
.then(response => {
|
.then(response => {
|
||||||
this.payLinks = _.reject(this.payLinks, obj => obj.id === data.id)
|
this.payLinks = _.reject(this.payLinks, obj => obj.id === data.id)
|
||||||
this.payLinks.push(mapScrubLink(response.data))
|
this.payLinks.push(mapScrubLink(response.data))
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@ async def api_scrub_create_or_update(
|
||||||
link_id=None,
|
link_id=None,
|
||||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
wallet: WalletTypeInfo = Depends(require_admin_key),
|
||||||
):
|
):
|
||||||
print("WAH")
|
|
||||||
if link_id:
|
if link_id:
|
||||||
link = await get_scrub_link(link_id)
|
link = await get_scrub_link(link_id)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue