allow custom path (#17)

* allow custom path

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Tiago Vasconcelos 2023-09-26 15:56:21 +01:00 committed by GitHub
parent 0215986a59
commit 473614f8be
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 fastapi.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 @@ nostrrelay_ext: APIRouter = APIRouter(prefix="/nostrrelay", tags=["NostrRelay"])
nostrrelay_static_files = [ nostrrelay_static_files = [
{ {
"path": "/nostrrelay/static", "path": "/nostrrelay/static",
"app": StaticFiles(directory="lnbits/extensions/nostrrelay/static"),
"name": "nostrrelay_static", "name": "nostrrelay_static",
} }
] ]
@ -32,7 +30,7 @@ scheduled_tasks: List[asyncio.Task] = []
def nostrrelay_renderer(): def nostrrelay_renderer():
return template_renderer(["lnbits/extensions/nostrrelay/templates"]) return template_renderer(["nostrrelay/templates"])
from .tasks import wait_for_paid_invoices from .tasks import wait_for_paid_invoices

View file

@ -2,5 +2,6 @@
"name": "Nostr Relay", "name": "Nostr Relay",
"short_description": "One click launch your own relay!", "short_description": "One click launch your own relay!",
"tile": "/nostrrelay/static/image/nostrrelay.png", "tile": "/nostrrelay/static/image/nostrrelay.png",
"contributors": ["arcbtc", "DCs"] "contributors": ["arcbtc", "DCs"],
"min_lnbits_version": "0.11.0"
} }