feat: add FacebookBot automation class and FastAPI endpoint for posting group comments
This commit is contained in:
@@ -93,8 +93,8 @@ def post_facebook_comment(req: FacebookCommentRequest):
|
||||
logging.info(f"Đã xóa ảnh tạm: {local_image_path}")
|
||||
|
||||
if isinstance(result, dict) and "status" in result:
|
||||
if result["status"] == "error":
|
||||
raise HTTPException(status_code=500, detail=result.get("message"))
|
||||
# Trả về luôn JSON kết quả, n8n sẽ nhận HTTP 200 và tiếp tục vòng lặp
|
||||
# Ngay cả khi status == "error", ta vẫn muốn n8n chạy tiếp nhóm khác
|
||||
return result
|
||||
|
||||
return {"status": "success", "message": "Hoàn tất"}
|
||||
|
||||
Reference in New Issue
Block a user