diff options
Diffstat (limited to 'atuin-server/src/handlers/history.rs')
-rw-r--r-- | atuin-server/src/handlers/history.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/atuin-server/src/handlers/history.rs b/atuin-server/src/handlers/history.rs index 263d6cba9..7d6b27370 100644 --- a/atuin-server/src/handlers/history.rs +++ b/atuin-server/src/handlers/history.rs @@ -63,10 +63,6 @@ pub async fn list<DB: Database>( 100 }; - let history = db - .list_history(&user, req.sync_ts, req.history_ts, &req.host, page_size) - .await; - if req.sync_ts.unix_timestamp_nanos() < 0 || req.history_ts.unix_timestamp_nanos() < 0 { error!("client asked for history from < epoch 0"); return Err( @@ -75,6 +71,10 @@ pub async fn list<DB: Database>( ); } + let history = db + .list_history(&user, req.sync_ts, req.history_ts, &req.host, page_size) + .await; + if let Err(e) = history { error!("failed to load history: {}", e); return Err(ErrorResponse::reply("failed to load history") |