2021-11-25 18:52:16 +00:00
|
|
|
from fastapi import APIRouter
|
2021-09-16 19:42:05 +02:00
|
|
|
from fastapi.staticfiles import StaticFiles
|
2021-08-20 12:44:03 +01:00
|
|
|
|
|
|
|
from lnbits.db import Database
|
2021-09-16 19:42:05 +02:00
|
|
|
from lnbits.helpers import template_renderer
|
2021-08-20 12:44:03 +01:00
|
|
|
|
|
|
|
db = Database("ext_offlineshop")
|
|
|
|
|
2021-09-16 19:42:05 +02:00
|
|
|
offlineshop_static_files = [
|
|
|
|
{
|
|
|
|
"path": "/offlineshop/static",
|
2022-07-08 09:49:38 +01:00
|
|
|
"app": StaticFiles(packages=[("lnbits", "extensions/offlineshop/static")]),
|
2021-09-16 19:42:05 +02:00
|
|
|
"name": "offlineshop_static",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2021-11-26 05:58:20 +00:00
|
|
|
offlineshop_ext: APIRouter = APIRouter(prefix="/offlineshop", tags=["Offlineshop"])
|
2021-08-20 12:44:03 +01:00
|
|
|
|
|
|
|
|
2021-09-16 19:42:05 +02:00
|
|
|
def offlineshop_renderer():
|
2022-07-23 20:08:59 +01:00
|
|
|
return template_renderer(["lnbits/extensions/offlineshop/templates"])
|
|
|
|
|
2021-09-16 19:42:05 +02:00
|
|
|
|
2021-08-20 12:44:03 +01:00
|
|
|
from .lnurl import * # noqa
|
2021-09-16 19:42:05 +02:00
|
|
|
from .views import * # noqa
|
|
|
|
from .views_api import * # noqa
|