diff --git a/static/js/index.js b/static/js/index.js index dd179be..c442c14 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -114,11 +114,7 @@ window.app = Vue.createApp({ lines.push('callbackUrl=' + window.bleskomat_vars.callback_url) lines.push('shorten=true') var content = lines.join('\n') - var status = Quasar.utils.exportFile( - 'bleskomat.conf', - content, - 'text/plain' - ) + var status = Quasar.exportFile('bleskomat.conf', content, 'text/plain') if (status !== true) { Quasar.plugins.Notify.create({ message: 'Browser denied file download...', diff --git a/views.py b/views.py index ff296ae..d49a65b 100644 --- a/views.py +++ b/views.py @@ -1,5 +1,4 @@ from fastapi import APIRouter, Depends, Request -from fastapi.templating import Jinja2Templates from lnbits.core.models import User from lnbits.decorators import check_user_exists from lnbits.helpers import template_renderer @@ -8,8 +7,6 @@ from .exchange_rates import exchange_rate_providers_serializable, fiat_currencies from .helpers import get_callback_url -templates = Jinja2Templates(directory="templates") - def bleskomat_renderer(): return template_renderer(["bleskomat/templates"]) @@ -27,5 +24,5 @@ async def index(req: Request, user: User = Depends(check_user_exists)): } return bleskomat_renderer().TemplateResponse( "bleskomat/index.html", - {"request": req, "user": user.dict(), "bleskomat_vars": bleskomat_vars}, + {"request": req, "user": user.json(), "bleskomat_vars": bleskomat_vars}, )