2025-08-24 14:45:47 +09:00
|
|
|
from flask_restx import Resource
|
2024-05-15 16:14:49 +08:00
|
|
|
|
2025-08-27 16:05:22 +08:00
|
|
|
from controllers.web import web_ns
|
2024-05-15 16:14:49 +08:00
|
|
|
from services.feature_service import FeatureService
|
|
|
|
|
|
|
|
|
|
|
2025-08-27 16:05:22 +08:00
|
|
|
@web_ns.route("/system-features")
|
2024-05-15 16:14:49 +08:00
|
|
|
class SystemFeatureApi(Resource):
|
2025-08-27 16:05:22 +08:00
|
|
|
@web_ns.doc("get_system_features")
|
|
|
|
|
@web_ns.doc(description="Get system feature flags and configuration")
|
|
|
|
|
@web_ns.doc(responses={200: "System features retrieved successfully", 500: "Internal server error"})
|
2024-05-15 16:14:49 +08:00
|
|
|
def get(self):
|
2025-08-27 16:05:22 +08:00
|
|
|
"""Get system feature flags and configuration.
|
2024-05-15 16:14:49 +08:00
|
|
|
|
2025-08-27 16:05:22 +08:00
|
|
|
Returns the current system feature flags and configuration
|
|
|
|
|
that control various functionalities across the platform.
|
2024-05-15 16:14:49 +08:00
|
|
|
|
2025-08-27 16:05:22 +08:00
|
|
|
Returns:
|
|
|
|
|
dict: System feature configuration object
|
|
|
|
|
"""
|
|
|
|
|
return FeatureService.get_system_features().model_dump()
|