diff --git a/app.py b/app.py index eb20dbf..c3e573f 100644 --- a/app.py +++ b/app.py @@ -65,50 +65,7 @@ def save_status(status): return False -@app.route('/status.json', methods=['GET']) -def get_status(): - """ - GET /status.json - Retrieve current status - --- - responses: - 200: - description: Current GitOps status - schema: - type: object - properties: - repo: - type: string - example: "rsyslog" - server: - type: string - example: "rsyslog-lab" - sync_status: - type: string - enum: ["SYNCED", "OUT_OF_SYNC", "UNKNOWN"] - drift_count: - type: integer - example: 0 - files: - type: array - items: - type: object - properties: - name: - type: string - last_check: - type: string - format: date-time - example: "2026-04-23T10:30:00Z" - """ - try: - status = load_status() - if status: - return jsonify(status), 200 - else: - return jsonify({"error": "Failed to load status"}), 500 - except Exception as e: - logger.error(f"Error in GET /status.json: {e}") - return jsonify({"error": str(e)}), 500 + @app.route('/api/status', methods=['GET', 'POST', 'OPTIONS'])