[#28] Moved db stuff to own module
This commit is contained in:
parent
91985a1710
commit
0877cc590c
4 changed files with 28 additions and 23 deletions
|
|
@ -55,7 +55,7 @@ fn run_db_migrations(rocket: Rocket) -> Result<Rocket, Rocket> {
|
|||
let conn = FejDbConn::get_one(&rocket).expect("database connection");
|
||||
match embedded_migrations::run(&*conn) {
|
||||
Ok(()) => Ok(rocket),
|
||||
Err(e) => Err(rocket),
|
||||
Err(_) => Err(rocket),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use crate::FejDbConn;
|
||||
use fej::ivago::{get_pickup_times, search_streets, BasicDate, PickupTime, Street};
|
||||
use fej::ivago::db::search_streets;
|
||||
use fej::ivago::{get_pickup_times, BasicDate, PickupTime, Street};
|
||||
use rocket::http::Status;
|
||||
use rocket_contrib::json::Json;
|
||||
|
||||
|
|
|
|||
Reference in a new issue