Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhongxuanWang committed Dec 3, 2023
1 parent 744851d commit c5661cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/fundraisers/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_by_club_id(club_id):
Gets fundraisers by a club by its id
"""

fundraisers_by_club = [fundraiser.serialize() for fundraiser in Fundraiser.query.filter_by(club_id=club_id)]
fundraisers_by_club = [fundraiser.serialize(ios_style=True) for fundraiser in Fundraiser.query.filter_by(club_id=club_id)]

return success_message(fundraisers_by_club)

Expand All @@ -85,7 +85,7 @@ def get_all_fundraisers():
Gets all fundraisers
"""

all_fundraisers = [fundraiser.serialize() for fundraiser in Fundraiser.query.all()]
all_fundraisers = [fundraiser.serialize(ios_style=True) for fundraiser in Fundraiser.query.all()]

return all_fundraisers

Expand Down
2 changes: 1 addition & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def success_message(x, code=201):
:return: (json.dumps(x), code)
"""
if hasattr(x, 'serialize'):
x = x.serialize()
x = x.serialize(ios_style=True)
return json.dumps({'status': 'success', 'success_msg': x}), code


Expand Down

0 comments on commit c5661cd

Please sign in to comment.