Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /JeanExtreme002_Dokku-API /src /api /routers /admin /plugins.py
| from fastapi import APIRouter, FastAPI, status | |
| from fastapi.responses import JSONResponse | |
| from src.api.services import PluginService | |
| def get_router(app: FastAPI) -> APIRouter: | |
| router = APIRouter() | |
| async def list_plugins(): | |
| success, result = await PluginService.list_plugins() | |
| return JSONResponse( | |
| status_code=status.HTTP_200_OK, | |
| content={"success": success, "result": result}, | |
| ) | |
| async def install_plugin(plugin_name: str, plugin_url: str): | |
| success, result = await PluginService.install_plugin(plugin_url, plugin_name) | |
| return JSONResponse( | |
| status_code=status.HTTP_200_OK, | |
| content={"success": success, "result": result}, | |
| ) | |
| async def uninstall_plugin(plugin_name: str): | |
| success, result = await PluginService.uninstall_plugin(plugin_name) | |
| return JSONResponse( | |
| status_code=status.HTTP_200_OK, | |
| content={"success": success, "result": result}, | |
| ) | |
| async def is_plugin_installed(plugin_name: str): | |
| success, result = await PluginService.is_plugin_installed(plugin_name) | |
| return JSONResponse( | |
| status_code=status.HTTP_200_OK, | |
| content={"success": success, "result": result}, | |
| ) | |
| return router | |
Xet Storage Details
- Size:
- 1.65 kB
- Xet hash:
- c71d70ca868547421079d266aa757c29862fbed77bc5983e2106a4e61ebb0a56
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.