diff --git a/src/lib.rs b/src/db.rs similarity index 100% rename from src/lib.rs rename to src/db.rs diff --git a/src/main.rs b/src/main.rs index 40ba070..e0f1a2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,8 +4,8 @@ extern crate actix_web; mod schema; mod model; -mod route; -mod lib; +mod routes; +mod db; use actix_web::{App, HttpServer, Responder, web, HttpResponse}; use std::env; @@ -32,7 +32,7 @@ async fn main() -> std::io::Result<()> { println!("Server will be listening: {}", server_string); HttpServer::new(|| { App::new().service(web::scope("/v1") - .configure(route::init_routes) + .configure(routes::init_routes) ) .route("/health", web::get().to(health)) }) diff --git a/src/route.rs b/src/routes.rs similarity index 97% rename from src/route.rs rename to src/routes.rs index 6cd53d3..b35e27b 100644 --- a/src/route.rs +++ b/src/routes.rs @@ -3,7 +3,7 @@ extern crate diesel; use actix_web::{get, web, HttpResponse, Responder}; use crate::diesel::prelude::*; -use crate::lib::establish_connection; +use crate::db::establish_connection; use crate::model::*; #[get("/subtitles/list")]