mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-02-07 01:37:05 +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)
|
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!"))?;
|
r.internal_error(ExecError::boxed_new("Unsupported like type!"))?;
|
||||||
unreachable!();
|
unreachable!();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user