summaryrefslogtreecommitdiffstats
path: root/atuin-server
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2021-11-21 14:34:04 +0000
committerGitHub <noreply@github.com>2021-11-21 14:34:04 +0000
commit6e8ec8689d85bf97e79455f7c3644daa5c8e02fd (patch)
tree5063817acbc6c8a5aa23b2d81dd19bd50253916a /atuin-server
parentf2c1922e481b49fc169cd9dce3709c9798f22f6a (diff)
chore: improve build times (#213)
Diffstat (limited to 'atuin-server')
-rw-r--r--atuin-server/src/router.rs18
1 files changed, 12 insertions, 6 deletions
diff --git a/atuin-server/src/router.rs b/atuin-server/src/router.rs
index ffab74e5..04905a0f 100644
--- a/atuin-server/src/router.rs
+++ b/atuin-server/src/router.rs
@@ -66,7 +66,8 @@ pub async fn router(
.and(warp::path::end())
.and(with_user(postgres.clone()))
.and(with_db(postgres.clone()))
- .and_then(handlers::history::count);
+ .and_then(handlers::history::count)
+ .boxed();
let sync = warp::get()
.and(warp::path("sync"))
@@ -75,7 +76,8 @@ pub async fn router(
.and(warp::path::end())
.and(with_user(postgres.clone()))
.and(with_db(postgres.clone()))
- .and_then(handlers::history::list);
+ .and_then(handlers::history::list)
+ .boxed();
let add_history = warp::post()
.and(warp::path("history"))
@@ -83,14 +85,16 @@ pub async fn router(
.and(warp::body::json())
.and(with_user(postgres.clone()))
.and(with_db(postgres.clone()))
- .and_then(handlers::history::add);
+ .and_then(handlers::history::add)
+ .boxed();
let user = warp::get()
.and(warp::path("user"))
.and(warp::path::param::<String>())
.and(warp::path::end())
.and(with_db(postgres.clone()))
- .and_then(handlers::user::get);
+ .and_then(handlers::user::get)
+ .boxed();
let register = warp::post()
.and(warp::path("register"))
@@ -98,14 +102,16 @@ pub async fn router(
.and(warp::body::json())
.and(with_settings(settings.clone()))
.and(with_db(postgres.clone()))
- .and_then(handlers::user::register);
+ .and_then(handlers::user::register)
+ .boxed();
let login = warp::post()
.and(warp::path("login"))
.and(warp::path::end())
.and(warp::body::json())
.and(with_db(postgres))
- .and_then(handlers::user::login);
+ .and_then(handlers::user::login)
+ .boxed();
let r = warp::any()
.and(