From 9643cdd104df8b434bc3ea6b8f906f536a072547 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Thu, 10 Jun 2021 22:22:31 +0200 Subject: [PATCH] Renamed some files due to unclear naming in the first place Signed-off-by: Louis Vallat --- src/{lib.rs => db.rs} | 0 src/main.rs | 6 +++--- src/{route.rs => routes.rs} | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename src/{lib.rs => db.rs} (100%) rename src/{route.rs => routes.rs} (97%) 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")]