home: almost finished bibou oracle
This commit is contained in:
parent
01dfdae15e
commit
ddf2fe4913
7 changed files with 101 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ pub struct AppState {
|
|||
pub mp_tracks: Vec<Track>,
|
||||
pub p_tracks: Vec<Track>,
|
||||
pub website_news: Vec<WebsiteArticle>,
|
||||
pub bibou_quotes: Vec<String>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
|
|
@ -31,6 +32,11 @@ impl AppState {
|
|||
|
||||
news
|
||||
},
|
||||
bibou_quotes: serde_json::from_str(
|
||||
&std::fs::read_to_string("content/bibou-quotes.json")
|
||||
.expect("bibou-quotes.json non trouvé"),
|
||||
)
|
||||
.expect("JSON invalide"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue