def post_activity_comment(post_type, post_id): app.logger.debug("request:[%s],[%s],[%s]\n" % (request.headers, request.args, request.json)) app.logger.debug("type:[%s,%s],current_user:%s\n" % (post_type, post_id, current_user.user_id)) comment = request.json if comment is None: app.logger.error("missing parameters content:%s" % post_id) abort(400) activity = Activity(current_user.user_id, post_type, post_id) ret = activity.post_comment(comment) app.logger.debug("post_activity_comment:%s" % ret) return jsonify(ret)