Karan6124 commited on
Commit
7e75d84
·
1 Parent(s): c6f86a2

clean: remove temporary debug endpoint before production release

Browse files
Files changed (1) hide show
  1. backend/app/api/endpoints.py +1 -25
backend/app/api/endpoints.py CHANGED
@@ -868,28 +868,4 @@ async def chat_with_analyst(
868
  "subscription_tier": user.subscription_tier,
869
  "messages_remaining": user.messages_remaining,
870
  "monthly_messages_used": user.monthly_messages_used
871
- }
872
-
873
- @router.get("/debug-logs")
874
- async def get_debug_logs(service: str = "worker", type: str = "err", lines: int = 100):
875
- """
876
- Temporary debug endpoint to read supervisor logs in the container.
877
- """
878
- import os
879
- log_path = f"/var/log/{service}.{type}.log"
880
- if not os.path.exists(log_path):
881
- available = []
882
- if os.path.exists("/var/log"):
883
- available = os.listdir("/var/log")
884
- return {"error": f"Log file not found: {log_path}", "available_logs": available}
885
-
886
- try:
887
- with open(log_path, "r") as f:
888
- content = f.readlines()
889
- return {
890
- "service": service,
891
- "type": type,
892
- "lines": content[-lines:]
893
- }
894
- except Exception as e:
895
- return {"error": str(e)}
 
868
  "subscription_tier": user.subscription_tier,
869
  "messages_remaining": user.messages_remaining,
870
  "monthly_messages_used": user.monthly_messages_used
871
+ }