chore: code clean-up
This commit is contained in:
parent
61fb44a04e
commit
4345361847
|
@ -775,9 +775,7 @@ async def api_install_extension(
|
||||||
@core_app.delete("/api/v1/extension/{ext_id}")
|
@core_app.delete("/api/v1/extension/{ext_id}")
|
||||||
async def api_uninstall_extension(ext_id: str, user: User = Depends(check_admin)):
|
async def api_uninstall_extension(ext_id: str, user: User = Depends(check_admin)):
|
||||||
|
|
||||||
installable_extensions: List[
|
installable_extensions = await InstallableExtension.get_installable_extensions()
|
||||||
InstallableExtension
|
|
||||||
] = await InstallableExtension.get_installable_extensions()
|
|
||||||
|
|
||||||
extensions = [e for e in installable_extensions if e.id == ext_id]
|
extensions = [e for e in installable_extensions if e.id == ext_id]
|
||||||
if len(extensions) == 0:
|
if len(extensions) == 0:
|
||||||
|
|
|
@ -52,7 +52,7 @@ class Extension(NamedTuple):
|
||||||
|
|
||||||
|
|
||||||
class ExtensionManager:
|
class ExtensionManager:
|
||||||
def __init__(self, include_disabled_exts=False):
|
def __init__(self):
|
||||||
self._disabled: List[str] = settings.lnbits_disabled_extensions
|
self._disabled: List[str] = settings.lnbits_disabled_extensions
|
||||||
self._admin_only: List[str] = settings.lnbits_admin_extensions
|
self._admin_only: List[str] = settings.lnbits_admin_extensions
|
||||||
self._extension_folders: List[str] = [
|
self._extension_folders: List[str] = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user