postComment method
- String featureRequestId,
- CommentDraft draft, {
- 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);
}