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:
parent
22ce88ee53
commit
e62ea3c3ad
@ -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!();
|
||||
|
Loading…
x
Reference in New Issue
Block a user