2021-10-29 12:44:45 +01:00
|
|
|
from fastapi import APIRouter
|
2022-12-31 14:15:23 +00:00
|
|
|
from fastapi.staticfiles import StaticFiles
|
2021-10-29 12:44:45 +01:00
|
|
|
|
|
|
|
from lnbits.db import Database
|
|
|
|
from lnbits.helpers import template_renderer
|
|
|
|
|
|
|
|
db = Database("ext_streamalerts")
|
|
|
|
|
2021-11-12 04:14:55 +00:00
|
|
|
streamalerts_ext: APIRouter = APIRouter(prefix="/streamalerts", tags=["streamalerts"])
|
|
|
|
|
2022-12-31 14:15:23 +00:00
|
|
|
streamalerts_static_files = [
|
|
|
|
{
|
|
|
|
"path": "/streamalerts/static",
|
|
|
|
"app": StaticFiles(directory="lnbits/extensions/streamalerts/static"),
|
|
|
|
"name": "streamalerts_static",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2021-10-29 12:44:45 +01:00
|
|
|
|
|
|
|
def streamalerts_renderer():
|
|
|
|
return template_renderer(["lnbits/extensions/streamalerts/templates"])
|
|
|
|
|
2021-11-12 04:14:55 +00:00
|
|
|
|
2021-10-29 12:44:45 +01:00
|
|
|
from .views import * # noqa
|
|
|
|
from .views_api import * # noqa
|