Skip to content

Commit

Permalink
add some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
madanalogy committed Nov 15, 2023
1 parent 4772f31 commit 2c885e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ def run_add(chat_id, text):
if len(lines) < 2:
return constants.ERROR_ADD_FORMAT
core = lines[0].split(",")
print(core)
if len(core) != 3:
return constants.ERROR_ADD_FORMAT
amount = core[1].strip()
if not is_valid_amount(amount):
return constants.ERROR_PRECONDITION
amount = float(amount)
payer = core[2].strip().lower(),
print(payer)
details = {
"name": core[0].strip().lower(),
"amount": amount,
Expand Down
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Bob
John
Bob was gonna cab back with Mary but John asked if they could add a stop:
Bob was gonna cab back with Mary but John asked if they could drop him off along the way:
/add Cab Ride, 42.50, Bob
John, 7.50
Mary'''
Expand Down

0 comments on commit 2c885e6

Please sign in to comment.