fetchComments
Retrieves all comments for a specific post, sorted by creation date (newest first).ID of the post to fetch comments for
Promise<{ rows: CommentType[], total: number }>
Error Handling: Throws error if fetching fails. Error is logged and re-thrown.
executeComment
Executes a comment action through the comments guard function. This is the recommended way to perform comment operations as it includes proper validation and authorization.The action to perform on the comment
ID of the post (required for add action)
ID of the comment (required for update and delete actions)
Comment content (required for add and update actions)
Promise<Execution>
Error Handling: Throws error if execution fails or status is “failed”. Error is logged and re-thrown.