fd
This commit is contained in:
parent
af1f66222e
commit
0a88fd57ac
2 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,7 @@ def api_flag_comment(cid, v):
|
||||||
return "", 409
|
return "", 409
|
||||||
|
|
||||||
reason = request.form.get("reason", "")[:100].strip()
|
reason = request.form.get("reason", "")[:100].strip()
|
||||||
|
print(reason)
|
||||||
flag = CommentFlag(comment_id=comment.id,
|
flag = CommentFlag(comment_id=comment.id,
|
||||||
user_id=v.id,
|
user_id=v.id,
|
||||||
reason=reason,
|
reason=reason,
|
||||||
|
|
|
@ -229,6 +229,7 @@
|
||||||
xhr.open("POST", '/api/flag/comment/'+id, true);
|
xhr.open("POST", '/api/flag/comment/'+id, true);
|
||||||
var form = new FormData()
|
var form = new FormData()
|
||||||
form.append("formkey", formkey());
|
form.append("formkey", formkey());
|
||||||
|
console.log(document.getElementById("reason").value)
|
||||||
form.append("reason", document.getElementById("reason").value);
|
form.append("reason", document.getElementById("reason").value);
|
||||||
|
|
||||||
xhr.withCredentials=true;
|
xhr.withCredentials=true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue