From e374df775676820d16c1a05489504c908b9f59d7 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Tue, 26 Sep 2023 13:05:14 +0100 Subject: [PATCH] allow custom path (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * allow custom path --------- Co-authored-by: dni ⚡ --- __init__.py | 4 +--- config.json | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index c9e0eb8..f7f4545 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,6 @@ from fastapi import APIRouter, Request, Response from fastapi.routing import APIRoute -from fastapi.staticfiles import StaticFiles from fastapi.responses import JSONResponse from lnbits.db import Database @@ -13,7 +12,6 @@ db = Database("ext_withdraw") withdraw_static_files = [ { "path": "/withdraw/static", - "app": StaticFiles(packages=[("lnbits", "extensions/withdraw/static")]), "name": "withdraw_static", } ] @@ -45,7 +43,7 @@ withdraw_ext.route_class = LNURLErrorResponseHandler def withdraw_renderer(): - return template_renderer(["lnbits/extensions/withdraw/templates"]) + return template_renderer(["withdraw/templates"]) from .lnurl import * # noqa: F401,F403 diff --git a/config.json b/config.json index c22d69c..49a66e7 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,7 @@ { "name": "LNURLw", "short_description": "Make LNURL withdraw links", - "tile": "/withdraw/static/image/lnurl-withdraw.png", - "contributors": ["arcbtc", "eillarra"] + "tile": "/withdraw/static/image/lnurl-withdraw.png", + "contributors": ["arcbtc", "eillarra"], + "min_lnbits_version": "0.11.0" }