1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-01-30 14:03:00 +00:00

Can update like status of a comment

This commit is contained in:
Pierre HUBERT 2020-07-10 10:35:24 +02:00
parent 22ce88ee53
commit e62ea3c3ad

View File

@ -39,6 +39,12 @@ pub fn update(r: &mut HttpRequestHandler) -> RequestResult {
LikeTarget(post.id, LikeType::POST)
}
// In case of comment
"comment" => {
let comment = r.post_comment_with_access("id")?;
LikeTarget(comment.id, LikeType::COMMENT)
}
_ => {
r.internal_error(ExecError::boxed_new("Unsupported like type!"))?;
unreachable!();