Skip to content

Commit 86c69d1

Browse files
Seluj78supalarry
authored andcommitted
Removed details from api route report
1 parent e705740 commit 86c69d1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

backend/PyMatcha/routes/api/profile/report.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232

3333
@profile_report_bp.route("/profile/report/<uid>", methods=["POST"])
34-
@validate_params({"reason": str}, {"details": str})
34+
@validate_params({"reason": str})
3535
@jwt_required
3636
def report_profile(uid):
3737
data = request.get_json()
@@ -40,10 +40,7 @@ def report_profile(uid):
4040
if reason not in ["harassment", "bot", "spam", "inappropriate content"]:
4141
raise BadRequestError("Reason must be 'harassment', 'bot', 'spam' or 'inappropriate content'")
4242

43-
try:
44-
details = data["details"]
45-
except KeyError:
46-
details = None
43+
details = None
4744
try:
4845
u = get_user(uid)
4946
except NotFoundError:

0 commit comments

Comments
 (0)