@@ -5,24 +5,21 @@ use actix_web::{
55 HttpRequest , Responder ,
66 web:: { Data , Json , Path } ,
77} ;
8- use tracing:: info;
9- use tracing:: instrument;
10-
118use htsget_http:: { Endpoint , PostRequest , post} ;
129use htsget_search:: HtsGet ;
10+ use tracing:: info;
11+ use tracing:: instrument;
1312
13+ use super :: { extract_request, handle_response} ;
1414use crate :: AppState ;
15- use crate :: handlers:: extract_request;
16-
17- use super :: handle_response;
1815
1916/// POST request reads endpoint
2017#[ instrument( skip( app_state) ) ]
2118pub async fn reads < H : HtsGet + Clone + Send + Sync + ' static > (
2219 request : Query < HashMap < String , String > > ,
23- body : Json < PostRequest > ,
2420 path : Path < String > ,
2521 http_request : HttpRequest ,
22+ body : Json < PostRequest > ,
2623 app_state : Data < AppState < H > > ,
2724) -> impl Responder {
2825 let request = extract_request ( request, path, http_request) ;
@@ -35,6 +32,7 @@ pub async fn reads<H: HtsGet + Clone + Send + Sync + 'static>(
3532 body. into_inner ( ) ,
3633 request,
3734 Endpoint :: Reads ,
35+ app_state. auth . clone ( ) ,
3836 )
3937 . await ,
4038 )
@@ -44,9 +42,9 @@ pub async fn reads<H: HtsGet + Clone + Send + Sync + 'static>(
4442#[ instrument( skip( app_state) ) ]
4543pub async fn variants < H : HtsGet + Clone + Send + Sync + ' static > (
4644 request : Query < HashMap < String , String > > ,
47- body : Json < PostRequest > ,
4845 path : Path < String > ,
4946 http_request : HttpRequest ,
47+ body : Json < PostRequest > ,
5048 app_state : Data < AppState < H > > ,
5149) -> impl Responder {
5250 let request = extract_request ( request, path, http_request) ;
@@ -59,6 +57,7 @@ pub async fn variants<H: HtsGet + Clone + Send + Sync + 'static>(
5957 body. into_inner ( ) ,
6058 request,
6159 Endpoint :: Variants ,
60+ app_state. auth . clone ( ) ,
6261 )
6362 . await ,
6463 )
0 commit comments