CommentableMixin Class
Controller mixin that implements basic commenting functionality. Uses the base model in the route model hook.
Item Index
Properties
Methods
addComment
(
Promise
-
text
Action that adds a new comment targeting the model by GUID.
Parameters:
-
text
StringThe text of the new comment
Returns:
Promise:
The newly created comment
deleteComment
(
Promise
-
comment
Action that handles deletion of an existing comment.
Parameters:
-
comment
Object
Returns:
Properties
comments
Comment[]
public
The list of comments associated with a model. Defaults to using the model hook, and ensures that new comments are shown first (to match API convention)