Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Muyu-Chen committed Dec 24, 2024
1 parent 57f0958 commit fe6f154
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion checkCardPIN.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def checkCardPINFunc(cardPIN):
print(f"Parsed price: {parsed_price}")
value2 = -1
# check if the card PIN is in the database
with open("cardPin.json", "r") as f:
with open("cardPIN.json", "r") as f:
data = json.load(f)
dataPrice = data.get(str(parsed_price))
# Assume price_level is the price level you determined earlier
Expand Down
4 changes: 2 additions & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def charge():
if returnValue != 0: # 不等于原来的余额就是成功
parsed_price = value2
# delete the card PIN from the database
with open("cardPin.json", "r") as f:
with open("cardPIN.json", "r") as f:
data = json.load(f)
dataPrice = data.get(str(parsed_price))
# Assume price_level is the price level you determined earlier
Expand All @@ -270,7 +270,7 @@ def charge():
# delete the card PIN from the database
dataPrice.remove(pin)
data[str(parsed_price)] = dataPrice
with open("cardPin.json", "w", encoding="utf-8") as f:
with open("cardPIN.json", "w", encoding="utf-8") as f:
json.dump(data, f, ensure_ascii=False, indent=4)
break
return jsonify({"message": "充值成功"}), 200
Expand Down

0 comments on commit fe6f154

Please sign in to comment.