mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Add year to book model
This commit is contained in:
@@ -43,6 +43,7 @@ pub struct AuthorBook {
|
||||
pub title: String,
|
||||
pub lang: String,
|
||||
pub file_type: String,
|
||||
pub year: i32,
|
||||
pub available_types: Vec<String>,
|
||||
pub uploaded: String,
|
||||
pub translators: Vec<Author>,
|
||||
@@ -57,6 +58,7 @@ impl From<book::Data> for AuthorBook {
|
||||
title,
|
||||
lang,
|
||||
file_type,
|
||||
year,
|
||||
uploaded,
|
||||
translations,
|
||||
book_sequences,
|
||||
@@ -70,6 +72,7 @@ impl From<book::Data> for AuthorBook {
|
||||
title,
|
||||
lang,
|
||||
file_type: file_type.clone(),
|
||||
year,
|
||||
available_types: get_available_types(file_type, source.unwrap().name),
|
||||
uploaded: uploaded.format("%Y-%m-%d").to_string(),
|
||||
translators: get_translators(translations),
|
||||
|
||||
Reference in New Issue
Block a user