mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-25 15:10:41 +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
26 lines
694 B
Python
26 lines
694 B
Python
from fastapi import APIRouter
|
|
from starlette.staticfiles import StaticFiles
|
|
|
|
from lnbits.db import Database
|
|
from lnbits.helpers import template_renderer
|
|
|
|
db = Database("ext_bleskomat")
|
|
|
|
bleskomat_static_files = [
|
|
{
|
|
"path": "/bleskomat/static",
|
|
"app": StaticFiles(packages=[("lnbits", "extensions/bleskomat/static")]),
|
|
"name": "bleskomat_static",
|
|
}
|
|
]
|
|
|
|
bleskomat_ext: APIRouter = APIRouter(prefix="/bleskomat", tags=["Bleskomat"])
|
|
|
|
|
|
def bleskomat_renderer():
|
|
return template_renderer([StaticFiles(packages=[("lnbits", "extensions/bleskomat/static/templates")])])
|
|
|
|
|
|
from .lnurl_api import * # noqa
|
|
from .views import * # noqa
|
|
from .views_api import * # noqa
|