allow custom path (#20)

* allow custom path

* minversion 0.11.0

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Tiago Vasconcelos 2023-09-25 12:03:13 +01:00 committed by GitHub
commit 0901e5eb15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -1,7 +1,6 @@
import asyncio import asyncio
from fastapi import APIRouter from fastapi import APIRouter
from starlette.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
@ -12,7 +11,6 @@ db = Database("ext_boltcards")
boltcards_static_files = [ boltcards_static_files = [
{ {
"path": "/boltcards/static", "path": "/boltcards/static",
"app": StaticFiles(packages=[("lnbits", "extensions/boltcards/static")]),
"name": "boltcards_static", "name": "boltcards_static",
} }
] ]
@ -21,7 +19,7 @@ boltcards_ext: APIRouter = APIRouter(prefix="/boltcards", tags=["boltcards"])
def boltcards_renderer(): def boltcards_renderer():
return template_renderer(["lnbits/extensions/boltcards/templates"]) return template_renderer(["boltcards/templates"])
from .lnurl import * # noqa: F401,F403 from .lnurl import * # noqa: F401,F403

View file

@ -2,5 +2,6 @@
"name": "Bolt Cards", "name": "Bolt Cards",
"short_description": "Self custody Bolt Cards with one time LNURLw", "short_description": "Self custody Bolt Cards with one time LNURLw",
"tile": "/boltcards/static/image/boltcard.png", "tile": "/boltcards/static/image/boltcard.png",
"contributors": ["iwarpbtc", "arcbtc", "leesalminen"] "contributors": ["iwarpbtc", "arcbtc", "leesalminen"],
"min_lnbits_version": "0.11.0"
} }