2021-09-30 14:42:04 +01:00
|
|
|
from fastapi import APIRouter
|
2021-10-05 09:19:21 +01:00
|
|
|
from fastapi.staticfiles import StaticFiles
|
2021-09-30 14:42:04 +01:00
|
|
|
|
2021-08-20 12:44:03 +01:00
|
|
|
from lnbits.db import Database
|
2021-10-05 09:19:21 +01:00
|
|
|
from lnbits.helpers import template_renderer
|
2021-08-20 12:44:03 +01:00
|
|
|
|
|
|
|
db = Database("ext_withdraw")
|
|
|
|
|
2021-10-05 09:19:21 +01:00
|
|
|
withdraw_static_files = [
|
|
|
|
{
|
|
|
|
"path": "/withdraw/static",
|
|
|
|
"app": StaticFiles(directory="lnbits/extensions/withdraw/static"),
|
|
|
|
"name": "withdraw_static",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2021-08-20 12:44:03 +01:00
|
|
|
|
2021-09-30 14:42:04 +01:00
|
|
|
withdraw_ext: APIRouter = APIRouter(
|
|
|
|
prefix="/withdraw",
|
2021-10-05 09:19:21 +01:00
|
|
|
tags=["withdraw"],
|
2021-09-30 14:42:04 +01:00
|
|
|
# "withdraw", __name__, static_folder="static", template_folder="templates"
|
2021-08-20 12:44:03 +01:00
|
|
|
)
|
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
|
2021-09-30 14:42:04 +01:00
|
|
|
def withdraw_renderer():
|
2021-10-17 18:33:29 +01:00
|
|
|
return template_renderer(["lnbits/extensions/withdraw/templates"])
|
2021-09-30 14:42:04 +01:00
|
|
|
|
2021-08-20 12:44:03 +01:00
|
|
|
|
|
|
|
from .lnurl import * # noqa
|
2021-10-18 10:58:09 +01:00
|
|
|
from .views import * # noqa
|
|
|
|
from .views_api import * # noqa
|
2021-10-05 09:19:21 +01:00
|
|
|
|
|
|
|
# @withdraw_ext.on_event("startup")
|
|
|
|
# def _do_it():
|
|
|
|
# register_listeners()
|