mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 22:58:46 +01:00
This commit is not exhaustive, and it is a trend in this codebase to not use StaticFiles() and instead use relative paths. This means the code cannot run anywhere other than the source code directory, as it will not find the files it is looking for
27 lines
679 B
Python
27 lines
679 B
Python
from fastapi import APIRouter
|
|
from fastapi.staticfiles import StaticFiles
|
|
|
|
from lnbits.db import Database
|
|
from lnbits.helpers import template_renderer
|
|
|
|
db = Database("ext_withdraw")
|
|
|
|
withdraw_static_files = [
|
|
{
|
|
"path": "/withdraw/static",
|
|
"app": StaticFiles(packages=[("lnbits", "extensions/withdraw/static")]),
|
|
"name": "withdraw_static",
|
|
}
|
|
]
|
|
|
|
|
|
withdraw_ext: APIRouter = APIRouter(prefix="/withdraw", tags=["withdraw"])
|
|
|
|
|
|
def withdraw_renderer():
|
|
return template_renderer([StaticFiles(packages=[("lnbits", "extensions/withdraw/static/templates")])])
|
|
|
|
|
|
from .lnurl import * # noqa
|
|
from .views import * # noqa
|
|
from .views_api import * # noqa
|