feat: add support for static files
This commit is contained in:
@@ -1,10 +1,18 @@
|
|||||||
from fastapi import APIRouter
|
from fastapi import APIRouter
|
||||||
|
from fastapi.staticfiles import StaticFiles
|
||||||
|
|
||||||
from lnbits.db import Database
|
from lnbits.db import Database
|
||||||
from lnbits.helpers import template_renderer
|
from lnbits.helpers import template_renderer
|
||||||
|
|
||||||
db = Database("ext_watchonly")
|
db = Database("ext_watchonly")
|
||||||
|
|
||||||
|
watchonly_static_files = [
|
||||||
|
{
|
||||||
|
"path": "/watchonly/static",
|
||||||
|
"app": StaticFiles(directory="lnbits/extensions/watchonly/static"),
|
||||||
|
"name": "watchonly_static",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
watchonly_ext: APIRouter = APIRouter(prefix="/watchonly", tags=["watchonly"])
|
watchonly_ext: APIRouter = APIRouter(prefix="/watchonly", tags=["watchonly"])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user