summaryrefslogtreecommitdiff
path: root/src/server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/server.rs b/src/server.rs
index 8bed9db..4cf4135 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -92,8 +92,10 @@ fn index_logged_in(user: LoggedInUser) -> Redirect {
#[get("/", rank = 2)]
fn index() -> Result<Template, Error> {
let mut context = default_context();
- context.insert("message".to_string(),
- json!("Welcome to your practice journal"));
+ context.insert(
+ "message".to_string(),
+ json!("Welcome to your practice journal"),
+ );
Ok(Template::render("index", context))
}
@@ -188,7 +190,14 @@ fn link_strava(params: State<Params>) -> Redirect {
))
}
-pub fn start(conn: diesel::PgConnection, db_url: &str, base_url: &str, static_path: &str, port: u16, template_path: &str) {
+pub fn start(
+ conn: diesel::PgConnection,
+ db_url: &str,
+ base_url: &str,
+ static_path: &str,
+ port: u16,
+ template_path: &str,
+) {
let mut database_config = HashMap::new();
let mut databases = HashMap::new();
database_config.insert("url", Value::from(db_url));