User Post Comment
'/users/{id}/post-comments'
GET
async find(
@param.path.string('id') id: string,
@param.query.object('filter') filter?: Filter<Comment>,
): Promise<Comment[]>Auth: No
Get a user's post comments.
POST
async create(
@param.path.string('id') id: typeof User.prototype.id,
@requestBody({
content: {
'application/json': {
schema: getModelSchemaRef(Comment, {
title: 'NewPostCommentInUser',
exclude: ['id'],
}),
},
},
}) postComment: Omit<Comment, 'id'>,
): Promise<Comment>Auth: Yes RBAC: Admin, User (owner)
Create a post comment for a given user.
PATCH
async patch(
@param.path.string('id') id: string,
@requestBody({
content: {
'application/json': {
schema: getModelSchemaRef(Comment, {partial: true}),
},
},
})
postComment: Partial<Comment>,
@param.query.object('where', getWhereSchemaFor(Comment)) where?: Where<Comment>,
): Promise<Count>Auth: Yes RBAC: Admin, User (owner)
Edit a post comment for a given user.
DEL
async delete(
@param.path.string('id') id: string,
@param.query.object('where', getWhereSchemaFor(Comment)) where?: Where<Comment>,
): Promise<Count>Auth: Yes RBAC: Admin, User (owner)
Delete a post comment for a given user.
Last updated