Implement Deserialize and Serialize for all types

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 6ffb6c5ebb
commit 7715609629

@ -1,6 +1,6 @@
use serde::Deserialize;
use serde::{Deserialize, Serialize};
#[derive(Deserialize)]
#[derive(Serialize, Deserialize)]
pub struct AddFileRequest {
pub path: String,
}

@ -1,9 +1,9 @@
use chrono::NaiveDateTime;
use mediarepo_model::file::File;
use mediarepo_model::file_type::FileType;
use serde::Serialize;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FileResponse {
pub name: Option<String>,
pub comment: Option<String>,
@ -28,7 +28,7 @@ impl From<File> for FileResponse {
}
}
#[derive(Clone, Debug, Serialize)]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct InfoResponse {
pub name: String,
pub version: String,

Loading…
Cancel
Save