diff --git a/src/holt59/aoc/__main__.py b/src/holt59/aoc/__main__.py index 1f8c9db..cced3e6 100644 --- a/src/holt59/aoc/__main__.py +++ b/src/holt59/aoc/__main__.py @@ -181,16 +181,14 @@ def main(): current = datetime.now() if api: - print( - json.dumps( - { - "type": "answer", - "answer": i_answer + 1, - "value": answer, - "answerTime_s": (current - last).total_seconds(), - "totalTime_s": (current - start).total_seconds(), - } - ) + dump_api_message( + "answer", + { + "answer": i_answer + 1, + "value": answer, + "answerTime_s": (current - last).total_seconds(), + "totalTime_s": (current - start).total_seconds(), + }, ) else: print(