We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e705740 commit 86c69d1Copy full SHA for 86c69d1
backend/PyMatcha/routes/api/profile/report.py
@@ -31,7 +31,7 @@
31
32
33
@profile_report_bp.route("/profile/report/<uid>", methods=["POST"])
34
-@validate_params({"reason": str}, {"details": str})
+@validate_params({"reason": str})
35
@jwt_required
36
def report_profile(uid):
37
data = request.get_json()
@@ -40,10 +40,7 @@ def report_profile(uid):
40
if reason not in ["harassment", "bot", "spam", "inappropriate content"]:
41
raise BadRequestError("Reason must be 'harassment', 'bot', 'spam' or 'inappropriate content'")
42
43
- try:
44
- details = data["details"]
45
- except KeyError:
46
- details = None
+ details = None
47
try:
48
u = get_user(uid)
49
except NotFoundError:
0 commit comments