feat: paywall extension

This commit is contained in:
Eneko Illarramendi
2020-04-21 23:42:41 +02:00
parent fd4dc6c48f
commit 403385c205
10 changed files with 229 additions and 43 deletions
+3 -3
View File
@@ -11,10 +11,10 @@ def create_paywall(*, wallet_id: str, url: str, memo: str, amount: int) -> Paywa
paywall_id = urlsafe_short_hash()
db.execute(
"""
INSERT INTO paywalls (id, wallet, url, memo, amount)
VALUES (?, ?, ?, ?, ?)
INSERT INTO paywalls (id, wallet, secret, url, memo, amount)
VALUES (?, ?, ?, ?, ?, ?)
""",
(paywall_id, wallet_id, url, memo, amount),
(paywall_id, wallet_id, urlsafe_short_hash(), url, memo, amount),
)
return get_paywall(paywall_id)