Fix query options parsing

This commit is contained in:
Niels Andriesse 2021-03-23 15:53:58 +11:00
parent 0d9183041c
commit 2638864607
1 changed files with 2 additions and 4 deletions

View File

@ -77,8 +77,7 @@ async fn handle_get_request(rpc_call: RpcCall, uri: http::Uri, pool: &storage::D
}
};
} else {
println!("Missing query options.");
return Err(warp::reject::custom(Error::InvalidRpcCall));
query_options = QueryOptions { limit : None, from_server_id : None };
}
return handlers::get_messages(query_options, pool).await;
},
@ -93,8 +92,7 @@ async fn handle_get_request(rpc_call: RpcCall, uri: http::Uri, pool: &storage::D
}
};
} else {
println!("Missing query options.");
return Err(warp::reject::custom(Error::InvalidRpcCall));
query_options = QueryOptions { limit : None, from_server_id : None };
}
return handlers::get_deleted_messages(query_options, pool).await
},