Remove old api
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
dvirlabs 2026-04-23 12:50:03 +03:00
parent 68255eb274
commit c206d8c90a

45
app.py
View File

@ -65,50 +65,7 @@ def save_status(status):
return False 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']) @app.route('/api/status', methods=['GET', 'POST', 'OPTIONS'])