This commit is contained in:
parent
d025981f0e
commit
9bf1bc807c
5 changed files with 8 additions and 8 deletions
|
@ -7,7 +7,7 @@ use std::{fs::File, io::Write, path::Path};
|
||||||
use crate::template::Template;
|
use crate::template::Template;
|
||||||
|
|
||||||
/// Store the configuration of config/config.toml
|
/// Store the configuration of config/config.toml
|
||||||
#[derive(Deserialize, Clone, Default, Debug)]
|
#[derive(Clone, Debug, Default, Deserialize)]
|
||||||
pub struct FileConfig {
|
pub struct FileConfig {
|
||||||
/// http/https
|
/// http/https
|
||||||
pub scheme: Option<String>,
|
pub scheme: Option<String>,
|
||||||
|
|
|
@ -5,12 +5,12 @@ use serde::Deserialize;
|
||||||
|
|
||||||
use crate::misc::utils::get_reqwest_client;
|
use crate::misc::utils::get_reqwest_client;
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct GithubResponse {
|
struct GithubResponse {
|
||||||
items: Vec<GithubProject>,
|
items: Vec<GithubProject>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct GithubProject {
|
struct GithubProject {
|
||||||
repository_url: String,
|
repository_url: String,
|
||||||
number: u32,
|
number: u32,
|
||||||
|
@ -19,7 +19,7 @@ struct GithubProject {
|
||||||
pull_request: GithubPullRequest,
|
pull_request: GithubPullRequest,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Debug, Deserialize)]
|
||||||
struct GithubPullRequest {
|
struct GithubPullRequest {
|
||||||
html_url: String,
|
html_url: String,
|
||||||
merged_at: Option<String>,
|
merged_at: Option<String>,
|
||||||
|
|
|
@ -26,7 +26,7 @@ struct PortfolioTemplate {
|
||||||
closed: Option<Vec<Project>>,
|
closed: Option<Vec<Project>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Content, Clone, Debug)]
|
#[derive(Clone, Content, Debug)]
|
||||||
struct Project {
|
struct Project {
|
||||||
name: String,
|
name: String,
|
||||||
url: String,
|
url: String,
|
||||||
|
@ -35,7 +35,7 @@ struct Project {
|
||||||
pulls_closed: Vec<Pull>,
|
pulls_closed: Vec<Pull>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Content, Clone, Debug)]
|
#[derive(Clone, Content, Debug)]
|
||||||
struct Pull {
|
struct Pull {
|
||||||
url: String,
|
url: String,
|
||||||
id: u32,
|
id: u32,
|
||||||
|
|
|
@ -30,7 +30,7 @@ struct CoursTemplate {
|
||||||
content: Option<File>,
|
content: Option<File>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
struct FileNode {
|
struct FileNode {
|
||||||
name: String,
|
name: String,
|
||||||
is_dir: bool,
|
is_dir: bool,
|
||||||
|
|
|
@ -14,7 +14,7 @@ pub struct Template {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Structure used by /routes/*.rs
|
/// Structure used by /routes/*.rs
|
||||||
#[derive(Default, Debug)]
|
#[derive(Debug, Default)]
|
||||||
pub struct Infos {
|
pub struct Infos {
|
||||||
/// Title
|
/// Title
|
||||||
pub page_title: Option<String>,
|
pub page_title: Option<String>,
|
||||||
|
|
Loading…
Reference in a new issue