From c1dc7bb6683f862bb1bd9afe5f23b443049a5053 Mon Sep 17 00:00:00 2001 From: MoYoez Date: Tue, 25 Jul 2023 08:43:07 +0800 Subject: [PATCH] use bool instead of string --- app.py | 2 +- method.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 523d346..9671fd6 100644 --- a/app.py +++ b/app.py @@ -31,7 +31,7 @@ def get_bests(): best_list_args = {"bests": bests} best_list = {**is_phi, **best_list_args} get_formatData = BestsRender.get_formatData(session) - status = "true" + status = True content = {**best_list, **get_formatData} data = {"status": status, "content": content} data = json.dumps(data, ensure_ascii=False).encode("utf-8") diff --git a/method.py b/method.py index bdc98d2..3487222 100644 --- a/method.py +++ b/method.py @@ -114,9 +114,9 @@ def parse_render_bests(gameRecord, overflow: int): ] render.extend(records[: 19 + overflow]) if render[0]["score"] == 1000000: - isPhi = "true" + isPhi = True else: - isPhi = "false" + isPhi = False return render, isPhi