postComment method

Future<FeatureRequestComment> postComment(
  1. String featureRequestId,
  2. CommentDraft draft, {
  3. required String userToken,
})

Posts a comment on a feature request.

Implementation

Future<FeatureRequestComment> postComment(
  String featureRequestId,
  CommentDraft draft, {
  required String userToken,
}) async {
  final json = await _sendJson(
    method: 'POST',
    path: '/api/v1/feature-requests/$featureRequestId/comments',
    body: draft.toJson(),
    userToken: userToken,
    acceptedStatuses: const [200, 201],
  );
  return FeatureRequestComment.fromJson(json);
}