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
+3 -3
View File
@@ -10,10 +10,10 @@ async def create_lnurlpayout(wallet_id: str, data: CreateLnurlPayoutData) -> lnu
lnurlpayout_id = urlsafe_short_hash() lnurlpayout_id = urlsafe_short_hash()
await db.execute( await db.execute(
""" """
INSERT INTO lnurlpayout.lnurlpayouts (id, wallet, lnurlpay, threshold) INSERT INTO lnurlpayout.lnurlpayouts (id, title, wallet, lnurlpay, threshold)
VALUES (?, ?, ?, ?) 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) lnurlpayout = await get_lnurlpayout(lnurlpayout_id)
@@ -6,6 +6,7 @@ async def m001_initial(db):
""" """
CREATE TABLE lnurlpayout.lnurlpayouts ( CREATE TABLE lnurlpayout.lnurlpayouts (
id TEXT PRIMARY KEY, id TEXT PRIMARY KEY,
title TEXT NOT NULL,
wallet TEXT NOT NULL, wallet TEXT NOT NULL,
lnurlpay TEXT NOT NULL, lnurlpay TEXT NOT NULL,
threshold INT NOT NULL threshold INT NOT NULL
+1
View File
@@ -8,6 +8,7 @@ class CreateLnurlPayoutData(BaseModel):
class lnurlpayout(BaseModel): class lnurlpayout(BaseModel):
id: str id: str
title: str
wallet: str wallet: str
lnurlpay: str lnurlpay: str
threshold: str threshold: str
@@ -88,6 +88,14 @@
<q-dialog v-model="formDialog.show" position="top" @hide="closeFormDialog"> <q-dialog v-model="formDialog.show" position="top" @hide="closeFormDialog">
<q-card class="q-pa-lg q-pt-xl" style="width: 500px"> <q-card class="q-pa-lg q-pt-xl" style="width: 500px">
<q-form @submit="createlnurlpayout" class="q-gutter-md"> <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 <q-select
filled filled
dense dense