Commit 423f82a 1 parent ebee758 commit 423f82a Copy full SHA for 423f82a
File tree 1 file changed +6
-9
lines changed
relay-server/src/endpoints
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,13 @@ where
25
25
B :: Data : Send + Into < Bytes > ,
26
26
B :: Error : Into < axum:: BoxError > ,
27
27
{
28
- let trace = if content_type. as_ref ( ) . starts_with ( "application/json" ) {
29
- let json : Json < TracesData > = request. extract ( ) . await ?;
30
- Some ( json . 0 )
28
+ let trace: TracesData = if content_type. as_ref ( ) . starts_with ( "application/json" ) {
29
+ let Json ( trace ) = request. extract ( ) . await ?;
30
+ trace
31
31
} else if content_type. as_ref ( ) . starts_with ( "application/x-protobuf" ) {
32
- let protobuf : Protobuf < TracesData > = request. extract ( ) . await ?;
33
- Some ( protobuf . 0 )
32
+ let Protobuf ( trace ) = request. extract ( ) . await ?;
33
+ trace
34
34
} else {
35
- None
36
- } ;
37
-
38
- let Some ( trace) = trace else {
39
35
return Ok ( StatusCode :: UNSUPPORTED_MEDIA_TYPE ) ;
40
36
} ;
41
37
53
49
}
54
50
}
55
51
common:: handle_envelope ( & state, envelope) . await ?;
52
+
56
53
Ok ( StatusCode :: ACCEPTED )
57
54
}
58
55
You can’t perform that action at this time.
0 commit comments