fix: user required
This commit is contained in:
@@ -15,6 +15,7 @@ from pydantic import UUID4
|
|||||||
from starlette.staticfiles import PathLike as StaticFilesPathLike
|
from starlette.staticfiles import PathLike as StaticFilesPathLike
|
||||||
from starlette.types import Scope
|
from starlette.types import Scope
|
||||||
|
|
||||||
|
from lnbits.core.crud import get_user_from_account
|
||||||
from lnbits.core.db import core_app_extra
|
from lnbits.core.db import core_app_extra
|
||||||
from lnbits.core.models import Account
|
from lnbits.core.models import Account
|
||||||
from lnbits.decorators import (
|
from lnbits.decorators import (
|
||||||
@@ -313,13 +314,14 @@ def _add_wasm_extension_wrapper_route(
|
|||||||
request: Request,
|
request: Request,
|
||||||
account: Account = Depends(check_account_exists),
|
account: Account = Depends(check_account_exists),
|
||||||
) -> Any:
|
) -> Any:
|
||||||
|
user = await get_user_from_account(account)
|
||||||
return _wasm_extension_wrapper_response(
|
return _wasm_extension_wrapper_response(
|
||||||
request,
|
request,
|
||||||
extension,
|
extension,
|
||||||
frame_path,
|
frame_path,
|
||||||
auth,
|
auth,
|
||||||
path_params,
|
path_params,
|
||||||
None,
|
user.json() if user else None,
|
||||||
account.id,
|
account.id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user