add: store is_like on reactions
This commit is contained in:
parent
382e3bc7a6
commit
0ea6b25138
5 changed files with 15 additions and 4 deletions
|
@ -124,4 +124,5 @@ pub struct UpdateJournalEntryContext {
|
|||
pub struct CreateReaction {
|
||||
pub asset: usize,
|
||||
pub asset_type: AssetType,
|
||||
pub is_like: bool,
|
||||
}
|
||||
|
|
|
@ -37,7 +37,12 @@ pub async fn create_request(
|
|||
};
|
||||
|
||||
match data
|
||||
.create_reaction(Reaction::new(user.id, req.asset, req.asset_type))
|
||||
.create_reaction(Reaction::new(
|
||||
user.id,
|
||||
req.asset,
|
||||
req.asset_type,
|
||||
req.is_like,
|
||||
))
|
||||
.await
|
||||
{
|
||||
Ok(_) => Json(ApiReturn {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue