@@ -26,22 +26,22 @@ fn post_statistics(
26
26
mod handlers {
27
27
use std:: { convert:: Infallible , sync:: Arc } ;
28
28
29
- use mithril_common:: messages:: SnapshotMessage ;
29
+ use mithril_common:: messages:: SnapshotDownloadMessage ;
30
30
use reqwest:: StatusCode ;
31
31
32
32
use crate :: event_store:: { EventMessage , TransmitterService } ;
33
33
use crate :: http_server:: routes:: reply;
34
34
35
35
pub async fn post_snapshot_statistics (
36
- snapshot_message : SnapshotMessage ,
36
+ snapshot_download_message : SnapshotDownloadMessage ,
37
37
event_transmitter : Arc < TransmitterService < EventMessage > > ,
38
38
) -> Result < impl warp:: Reply , Infallible > {
39
39
let headers: Vec < ( & str , & str ) > = Vec :: new ( ) ;
40
40
41
41
match event_transmitter. send_event_message (
42
42
"HTTP::statistics" ,
43
43
"snapshot_downloaded" ,
44
- & snapshot_message ,
44
+ & snapshot_download_message ,
45
45
headers,
46
46
) {
47
47
Err ( e) => Ok ( reply:: internal_server_error ( e) ) ,
@@ -54,7 +54,7 @@ mod handlers {
54
54
mod tests {
55
55
use super :: * ;
56
56
57
- use mithril_common:: messages:: SnapshotMessage ;
57
+ use mithril_common:: messages:: SnapshotDownloadMessage ;
58
58
use mithril_common:: test_utils:: apispec:: APISpec ;
59
59
60
60
use warp:: { http:: Method , test:: request} ;
@@ -82,14 +82,14 @@ mod tests {
82
82
let mut builder = DependenciesBuilder :: new ( config) ;
83
83
let mut rx = builder. get_event_transmitter_receiver ( ) . await . unwrap ( ) ;
84
84
let dependency_manager = builder. build_dependency_container ( ) . await . unwrap ( ) ;
85
- let snapshot_message = SnapshotMessage :: dummy ( ) ;
85
+ let snapshot_download_message = SnapshotDownloadMessage :: dummy ( ) ;
86
86
87
87
let method = Method :: POST . as_str ( ) ;
88
88
let path = "/statistics/snapshot" ;
89
89
90
90
let response = request ( )
91
91
. method ( method)
92
- . json ( & snapshot_message )
92
+ . json ( & snapshot_download_message )
93
93
. path ( & format ! ( "/{SERVER_BASE_PATH}{path}" ) )
94
94
. reply ( & setup_router ( Arc :: new ( dependency_manager) ) )
95
95
. await ;
@@ -99,7 +99,7 @@ mod tests {
99
99
method,
100
100
path,
101
101
"application/json" ,
102
- & snapshot_message ,
102
+ & snapshot_download_message ,
103
103
& response,
104
104
) ;
105
105
0 commit comments