This commit is contained in:
parent
cef6e9f4b1
commit
c934d5f42e
6 changed files with 15 additions and 26 deletions
28
src/main.rs
28
src/main.rs
|
@ -2,33 +2,13 @@ use actix_files::Files;
|
||||||
use actix_web::{middleware::DefaultHeaders, web, App, HttpServer};
|
use actix_web::{middleware::DefaultHeaders, web, App, HttpServer};
|
||||||
use std::io::Result;
|
use std::io::Result;
|
||||||
|
|
||||||
|
use crate::routes::{agreements, blog, contrib, index, networks, not_found, portfolio};
|
||||||
|
|
||||||
mod config;
|
mod config;
|
||||||
mod template;
|
mod template;
|
||||||
mod utils;
|
|
||||||
|
|
||||||
#[path = "misc/github.rs"]
|
mod misc;
|
||||||
mod github;
|
mod routes;
|
||||||
|
|
||||||
#[path = "routes/agreements.rs"]
|
|
||||||
mod agreements;
|
|
||||||
|
|
||||||
#[path = "routes/not_found.rs"]
|
|
||||||
mod not_found;
|
|
||||||
|
|
||||||
#[path = "routes/index.rs"]
|
|
||||||
mod index;
|
|
||||||
|
|
||||||
#[path = "routes/networks.rs"]
|
|
||||||
mod networks;
|
|
||||||
|
|
||||||
#[path = "routes/portfolio.rs"]
|
|
||||||
mod portfolio;
|
|
||||||
|
|
||||||
#[path = "routes/contrib.rs"]
|
|
||||||
mod contrib;
|
|
||||||
|
|
||||||
#[path = "routes/blog.rs"]
|
|
||||||
mod blog;
|
|
||||||
|
|
||||||
#[actix_web::main]
|
#[actix_web::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
|
|
|
@ -3,7 +3,7 @@ use core::panic;
|
||||||
use reqwest::{header::ACCEPT, Error};
|
use reqwest::{header::ACCEPT, Error};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
use crate::utils::get_reqwest_client;
|
use crate::misc::utils::get_reqwest_client;
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct GithubResponse {
|
struct GithubResponse {
|
||||||
|
|
2
src/misc/mod.rs
Normal file
2
src/misc/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
pub mod github;
|
||||||
|
mod utils;
|
|
@ -2,7 +2,7 @@ use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::Config,
|
config::Config,
|
||||||
github::{fetch_pr, ProjectState},
|
misc::github::{fetch_pr, ProjectState},
|
||||||
template::Infos,
|
template::Infos,
|
||||||
};
|
};
|
||||||
use actix_web::{get, web, HttpResponse, Responder};
|
use actix_web::{get, web, HttpResponse, Responder};
|
||||||
|
|
7
src/routes/mod.rs
Normal file
7
src/routes/mod.rs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
pub mod agreements;
|
||||||
|
pub mod blog;
|
||||||
|
pub mod contrib;
|
||||||
|
pub mod index;
|
||||||
|
pub mod networks;
|
||||||
|
pub mod not_found;
|
||||||
|
pub mod portfolio;
|
Loading…
Reference in a new issue