allow custom path (#20)

* allow custom path

---------

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

View file

@ -2,7 +2,6 @@ import asyncio
from typing import List from typing import List
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
@ -15,7 +14,6 @@ db = Database("ext_nostrclient")
nostrclient_static_files = [ nostrclient_static_files = [
{ {
"path": "/nostrclient/static", "path": "/nostrclient/static",
"app": StaticFiles(directory="lnbits/extensions/nostrclient/static"),
"name": "nostrclient_static", "name": "nostrclient_static",
} }
] ]
@ -33,7 +31,7 @@ nostr = NostrClient()
def nostr_renderer(): def nostr_renderer():
return template_renderer(["lnbits/extensions/nostrclient/templates"]) return template_renderer(["nostrclient/templates"])
from .tasks import check_relays, init_relays, subscribe_events from .tasks import check_relays, init_relays, subscribe_events

View file

@ -2,5 +2,6 @@
"name": "Nostr Client", "name": "Nostr Client",
"short_description": "Nostr client for extensions", "short_description": "Nostr client for extensions",
"tile": "/nostrclient/static/images/nostr-bitcoin.png", "tile": "/nostrclient/static/images/nostr-bitcoin.png",
"contributors": ["calle"] "contributors": ["calle"],
"min_lnbits_version": "0.11.0"
} }