Added title

This commit is contained in:
benarc
2021-12-09 18:04:04 +00:00
parent 1227fb980f
commit f3876d547e
4 changed files with 13 additions and 3 deletions

View File

@@ -10,10 +10,10 @@ async def create_lnurlpayout(wallet_id: str, data: CreateLnurlPayoutData) -> lnu
lnurlpayout_id = urlsafe_short_hash()
await db.execute(
"""
INSERT INTO lnurlpayout.lnurlpayouts (id, wallet, lnurlpay, threshold)
VALUES (?, ?, ?, ?)
INSERT INTO lnurlpayout.lnurlpayouts (id, title, wallet, lnurlpay, threshold)
VALUES (?, ?, ?, ?, ?)
""",
(lnurlpayout_id, wallet_id, data.lnurlpay, data.threshold),
(lnurlpayout_id, data.title, wallet_id, data.lnurlpay, data.threshold),
)
lnurlpayout = await get_lnurlpayout(lnurlpayout_id)

View File

@@ -6,6 +6,7 @@ async def m001_initial(db):
"""
CREATE TABLE lnurlpayout.lnurlpayouts (
id TEXT PRIMARY KEY,
title TEXT NOT NULL,
wallet TEXT NOT NULL,
lnurlpay TEXT NOT NULL,
threshold INT NOT NULL

View File

@@ -8,6 +8,7 @@ class CreateLnurlPayoutData(BaseModel):
class lnurlpayout(BaseModel):
id: str
title: str
wallet: str
lnurlpay: str
threshold: str

View File

@@ -88,6 +88,14 @@
<q-dialog v-model="formDialog.show" position="top" @hide="closeFormDialog">
<q-card class="q-pa-lg q-pt-xl" style="width: 500px">
<q-form @submit="createlnurlpayout" class="q-gutter-md">
<q-input
filled
dense
v-model.trim="formDialog.data.title"
label="Title"
placeholder="Title"
type="text"
></q-input>
<q-select
filled
dense