mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-04 09:58:33 +01:00
Added title
This commit is contained in:
parent
55ec6b7fbe
commit
7cbf8d8902
3 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@ from sqlite3 import Row
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
class CreateLnurlPayoutData(BaseModel):
|
class CreateLnurlPayoutData(BaseModel):
|
||||||
|
title: str
|
||||||
lnurlpay: str
|
lnurlpay: str
|
||||||
threshold: int
|
threshold: int
|
||||||
|
|
||||||
|
|
|
@ -157,6 +157,7 @@
|
||||||
lnurlpayouts: [],
|
lnurlpayouts: [],
|
||||||
lnurlpayoutsTable: {
|
lnurlpayoutsTable: {
|
||||||
columns: [
|
columns: [
|
||||||
|
{name: 'title', align: 'left', label: 'Title', field: 'title'},
|
||||||
{name: 'wallet', align: 'left', label: 'Wallet', field: 'wallet'},
|
{name: 'wallet', align: 'left', label: 'Wallet', field: 'wallet'},
|
||||||
{
|
{
|
||||||
name: 'lnurlpay',
|
name: 'lnurlpay',
|
||||||
|
@ -202,6 +203,7 @@
|
||||||
},
|
},
|
||||||
createlnurlpayout: function () {
|
createlnurlpayout: function () {
|
||||||
var data = {
|
var data = {
|
||||||
|
title: this.formDialog.data.title,
|
||||||
lnurlpay: this.formDialog.data.lnurlpay,
|
lnurlpay: this.formDialog.data.lnurlpay,
|
||||||
threshold: this.formDialog.data.threshold
|
threshold: this.formDialog.data.threshold
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ async def api_lnurlpayouts(
|
||||||
async def api_lnurlpayout_create(
|
async def api_lnurlpayout_create(
|
||||||
data: CreateLnurlPayoutData, wallet: WalletTypeInfo = Depends(get_key_type)
|
data: CreateLnurlPayoutData, wallet: WalletTypeInfo = Depends(get_key_type)
|
||||||
):
|
):
|
||||||
print(await get_lnurlpayout_from_wallet(wallet.wallet.id))
|
|
||||||
if await get_lnurlpayout_from_wallet(wallet.wallet.id):
|
if await get_lnurlpayout_from_wallet(wallet.wallet.id):
|
||||||
raise HTTPException(status_code=HTTPStatus.FORBIDDEN, detail="Wallet already has lnurlpayout set")
|
raise HTTPException(status_code=HTTPStatus.FORBIDDEN, detail="Wallet already has lnurlpayout set")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue