mirror of
https://github.com/langgenius/dify.git
synced 2026-05-20 08:46:57 +08:00
- Correct docstring: Flask-RESTX iterates method_decorators forward; the last entry becomes outermost via composition, not via framework reversal. - Extract shared _APPS_READ_DECORATORS constant; was duplicated verbatim between AppReadResource and AppListApi. - Rename _AppReadResource -> AppReadResource (no longer module-private since app_info.py imports it). Drops the pyright ignore.
14 lines
434 B
Python
14 lines
434 B
Python
"""GET /openapi/v1/apps/<app_id>/info — port of service_api/app/app.py:AppInfoApi."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from controllers.openapi import openapi_ns
|
|
from controllers.openapi.apps import AppReadResource, app_info_payload
|
|
|
|
|
|
@openapi_ns.route("/apps/<string:app_id>/info")
|
|
class AppInfoApi(AppReadResource):
|
|
def get(self, app_id: str):
|
|
app, _ = self._load(app_id)
|
|
return app_info_payload(app), 200
|