Skip to content

Commit

Permalink
feat: Added ability to send hearts without using script
Browse files Browse the repository at this point in the history
  • Loading branch information
gregv committed Jul 26, 2024
1 parent e42779e commit 5880fe3
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 297 deletions.
9 changes: 4 additions & 5 deletions api/hearts/hearts_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ def get_hearts():
return {"hearts": res}

@bp.route("/hearts", methods=["POST"])
#@auth.require_user
@auth.require_user
def save_hearts():
print("save_hearts")
if auth_user and auth_user.user_id:
print(f"request.get_json(): {request.get_json()}")
# u: User | None = users_service.save_profile_metadata(auth_user.user_id, request.get_json())
#return vars(u) if u is not None else None
return "Biuttera"
res = hearts_service.save_hearts(auth_user.user_id, request.get_json())
return {"hearts": res}
else:
return "Biutter"
return "Error: Could not obtain user details for POST /hearts"
File renamed without changes.
File renamed without changes
291 changes: 0 additions & 291 deletions scripts/give_someone_hearts.py

This file was deleted.

Loading

0 comments on commit 5880fe3

Please sign in to comment.