Fix discussion and comment editing endpoints.
Fix use of `application/javascript` content type.