@@ -3,7 +3,7 @@ use crate::experiments::{Assignee, Experiment};
3
3
use crate :: prelude:: * ;
4
4
use crate :: results:: { DatabaseDB , EncodingType , ProgressData } ;
5
5
use crate :: server:: api_types:: { AgentConfig , ApiResponse } ;
6
- use crate :: server:: auth:: { auth_filter, AuthDetails , TokenType } ;
6
+ use crate :: server:: auth:: { auth_filter, AuthDetails } ;
7
7
use crate :: server:: messages:: Message ;
8
8
use crate :: server:: { Data , GithubData , HttpError } ;
9
9
use crossbeam_channel:: Sender ;
@@ -37,46 +37,46 @@ pub fn routes(
37
37
. and ( warp:: path:: end ( ) )
38
38
. and ( warp:: body:: json ( ) )
39
39
. and ( data_filter. clone ( ) )
40
- . and ( auth_filter ( data. clone ( ) , TokenType :: Agent ) )
40
+ . and ( auth_filter ( data. clone ( ) ) )
41
41
. map ( endpoint_config) ;
42
42
43
43
let next_experiment = warp:: post ( )
44
44
. and ( warp:: path ( "next-experiment" ) )
45
45
. and ( warp:: path:: end ( ) )
46
46
. and ( mutex_filter. clone ( ) )
47
47
. and ( github_data_filter)
48
- . and ( auth_filter ( data. clone ( ) , TokenType :: Agent ) )
48
+ . and ( auth_filter ( data. clone ( ) ) )
49
49
. map ( endpoint_next_experiment) ;
50
50
51
51
let next_crate = warp:: post ( )
52
52
. and ( warp:: path ( "next-crate" ) )
53
53
. and ( warp:: path:: end ( ) )
54
54
. and ( warp:: body:: json ( ) )
55
55
. and ( data_filter. clone ( ) )
56
- . and ( auth_filter ( data. clone ( ) , TokenType :: Agent ) )
56
+ . and ( auth_filter ( data. clone ( ) ) )
57
57
. map ( endpoint_next_crate) ;
58
58
59
59
let record_progress = warp:: post ( )
60
60
. and ( warp:: path ( "record-progress" ) )
61
61
. and ( warp:: path:: end ( ) )
62
62
. and ( warp:: body:: json ( ) )
63
63
. and ( data_filter. clone ( ) )
64
- . and ( auth_filter ( data. clone ( ) , TokenType :: Agent ) )
64
+ . and ( auth_filter ( data. clone ( ) ) )
65
65
. map ( endpoint_record_progress) ;
66
66
67
67
let heartbeat = warp:: post ( )
68
68
. and ( warp:: path ( "heartbeat" ) )
69
69
. and ( warp:: path:: end ( ) )
70
70
. and ( data_filter)
71
- . and ( auth_filter ( data. clone ( ) , TokenType :: Agent ) )
71
+ . and ( auth_filter ( data. clone ( ) ) )
72
72
. map ( endpoint_heartbeat) ;
73
73
74
74
let error = warp:: post ( )
75
75
. and ( warp:: path ( "error" ) )
76
76
. and ( warp:: path:: end ( ) )
77
77
. and ( warp:: body:: json ( ) )
78
78
. and ( mutex_filter)
79
- . and ( auth_filter ( data, TokenType :: Agent ) )
79
+ . and ( auth_filter ( data) )
80
80
. map ( endpoint_error) ;
81
81
82
82
warp:: any ( )
0 commit comments