Comments don't actually have any content to them #163
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If you use the comments API manually (e.g. via python,
(from https://maps.strafes.net/api/mapfixes/1/audit-events?Page=1&Limit=100)
r = requests.post("https://maps.strafes.net/api/mapfixes/1/comment", data="test", cookies={"session_id": session_id}, headers={"Content-Type": "text/plain"}); r), the comment will be created but will be recorded as being an empty stringNot sure if this is me somehow using the API wrong or if there's a bug in the API where the data is somehow lost
The relevant code is located here:
The
req.Read(data)is supposed to put the request bytes into the data bytes, but it's the only place that type of call is used. I guess I never tested it. Not sure what the solution should look like.Is
data="test"the function body in your python example? The openapi spec accepts the comment in the POST body:Yes, data is the body of the request sent after all the headers (I regularly try to call post with
body=xyzfirst, error, and realise it's called data instead). Judging from the spec, it would've rejected me if my body was empty