1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-12-28 14:38:52 +00:00

Fix error

This commit is contained in:
Pierre HUBERT 2020-07-13 19:41:48 +02:00
parent 88c45f05ac
commit 49c98e902a

View File

@ -7,9 +7,10 @@ use serde::Serialize;
use crate::data::user_like::UserLike; use crate::data::user_like::UserLike;
#[derive(Serialize)] #[derive(Serialize)]
#[allow(non_snake_case)]
pub struct UserLikeAPI { pub struct UserLikeAPI {
id: u64, id: u64,
user_id: u64, userID: u64,
time_sent: u64, time_sent: u64,
elem_type: String, elem_type: String,
elem_id: u64, elem_id: u64,
@ -19,7 +20,7 @@ impl UserLikeAPI {
pub fn new(l: &UserLike) -> UserLikeAPI { pub fn new(l: &UserLike) -> UserLikeAPI {
UserLikeAPI { UserLikeAPI {
id: l.id, id: l.id,
user_id: l.user_id.id(), userID: l.user_id.id(),
time_sent: l.time_sent, time_sent: l.time_sent,
elem_type: l.elem_type.clone(), elem_type: l.elem_type.clone(),
elem_id: l.elem_id, elem_id: l.elem_id,