Added title

This commit is contained in:
benarc 2021-12-16 23:39:51 +00:00
parent 55ec6b7fbe
commit 7cbf8d8902
3 changed files with 3 additions and 1 deletions

View file

@ -3,6 +3,7 @@ from sqlite3 import Row
from pydantic import BaseModel
class CreateLnurlPayoutData(BaseModel):
title: str
lnurlpay: str
threshold: int

View file

@ -157,6 +157,7 @@
lnurlpayouts: [],
lnurlpayoutsTable: {
columns: [
{name: 'title', align: 'left', label: 'Title', field: 'title'},
{name: 'wallet', align: 'left', label: 'Wallet', field: 'wallet'},
{
name: 'lnurlpay',
@ -202,6 +203,7 @@
},
createlnurlpayout: function () {
var data = {
title: this.formDialog.data.title,
lnurlpay: this.formDialog.data.lnurlpay,
threshold: this.formDialog.data.threshold
}

View file

@ -29,7 +29,6 @@ async def api_lnurlpayouts(
async def api_lnurlpayout_create(
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):
raise HTTPException(status_code=HTTPStatus.FORBIDDEN, detail="Wallet already has lnurlpayout set")
return