mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 21:02:31 +02:00
Updated example extension
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
#async def m001_initial(db):
|
||||||
|
|
||||||
|
# await db.execute(
|
||||||
|
# """
|
||||||
|
# CREATE TABLE IF NOT EXISTS example (
|
||||||
|
# id TEXT PRIMARY KEY,
|
||||||
|
# wallet TEXT NOT NULL,
|
||||||
|
# time TIMESTAMP NOT NULL DEFAULT (strftime('%s', 'now'))
|
||||||
|
# );
|
||||||
|
# """
|
||||||
|
# )
|
11
lnbits/extensions/example/models.py
Normal file
11
lnbits/extensions/example/models.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#from sqlite3 import Row
|
||||||
|
#from typing import NamedTuple
|
||||||
|
|
||||||
|
|
||||||
|
#class Example(NamedTuple):
|
||||||
|
# id: str
|
||||||
|
# wallet: str
|
||||||
|
#
|
||||||
|
# @classmethod
|
||||||
|
# def from_row(cls, row: Row) -> "Example":
|
||||||
|
# return cls(**dict(row))
|
@@ -21,8 +21,8 @@ async def api_example():
|
|||||||
"""Try to add descriptions for others."""
|
"""Try to add descriptions for others."""
|
||||||
tools = [
|
tools = [
|
||||||
{
|
{
|
||||||
"name": "Flask",
|
"name": "Quart",
|
||||||
"url": "https://flask.palletsprojects.com/",
|
"url": "https://pgjones.gitlab.io/quart/",
|
||||||
"language": "Python",
|
"language": "Python",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user