diff options
author | Martin Fischer <martin@push-f.com> | 2021-06-23 22:46:31 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-06-23 22:50:55 +0200 |
commit | 43b4b8693890a85f24eb358bc5545232ebf8e796 (patch) | |
tree | c83bbcacae18b034037399c197e1976346c40eb9 /src/post_routes.rs | |
parent | ca074febae4cd56ad5443c110a15662fa110dd81 (diff) |
make single-user mode operate on HEAD branch
Diffstat (limited to 'src/post_routes.rs')
-rw-r--r-- | src/post_routes.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/post_routes.rs b/src/post_routes.rs index 0d4631c..311ee57 100644 --- a/src/post_routes.rs +++ b/src/post_routes.rs @@ -10,7 +10,6 @@ use sputnik::hyper_body::SputnikBody; use std::path::Path; use std::str::from_utf8; -use crate::build_url_path; use crate::diff::diff; use crate::forms::edit_text_form; use crate::forms::move_form; @@ -268,7 +267,10 @@ async fn move_entry<C: Controller>( Ok(Builder::new() .status(StatusCode::FOUND) - .header("location", build_url_path(&ctx.branch, &data.dest)) + .header( + "location", + controller.build_url_path(&ctx.branch, &data.dest), + ) .body("redirecting".into()) .unwrap()) } @@ -308,7 +310,7 @@ async fn remove_entry<C: Controller>( .status(StatusCode::FOUND) .header( "location", - build_url_path(&ctx.branch, ctx.path.parent().unwrap().to_str().unwrap()), + controller.build_url_path(&ctx.branch, ctx.path.parent().unwrap().to_str().unwrap()), ) .body("redirecting".into()) .unwrap()) |