2021-10-14 22:30:47 +01:00
|
|
|
from fastapi import APIRouter
|
2022-07-04 17:34:30 +03:00
|
|
|
from fastapi.staticfiles import StaticFiles
|
2021-10-14 22:30:47 +01:00
|
|
|
|
2021-10-14 11:45:30 +01:00
|
|
|
from lnbits.db import Database
|
2021-10-14 22:30:47 +01:00
|
|
|
from lnbits.helpers import template_renderer
|
2021-10-14 11:45:30 +01:00
|
|
|
|
|
|
|
db = Database("ext_watchonly")
|
|
|
|
|
2022-07-04 17:34:30 +03:00
|
|
|
watchonly_static_files = [
|
|
|
|
{
|
|
|
|
"path": "/watchonly/static",
|
|
|
|
"app": StaticFiles(directory="lnbits/extensions/watchonly/static"),
|
|
|
|
"name": "watchonly_static",
|
|
|
|
}
|
|
|
|
]
|
2021-10-14 11:45:30 +01:00
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
watchonly_ext: APIRouter = APIRouter(prefix="/watchonly", tags=["watchonly"])
|
|
|
|
|
2021-10-14 11:45:30 +01:00
|
|
|
|
2021-10-14 22:30:47 +01:00
|
|
|
def watchonly_renderer():
|
2021-10-17 18:33:29 +01:00
|
|
|
return template_renderer(["lnbits/extensions/watchonly/templates"])
|
2021-10-14 22:30:47 +01:00
|
|
|
|
2021-10-14 11:45:30 +01:00
|
|
|
|
|
|
|
from .views import * # noqa
|
2021-10-18 10:58:09 +01:00
|
|
|
from .views_api import * # noqa
|