add tests for API methods
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use crate::server::SyncServer;
|
||||
use actix_web::{web, Scope};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub(crate) mod add_version;
|
||||
pub(crate) mod get_child_version;
|
||||
mod add_version;
|
||||
mod get_child_version;
|
||||
|
||||
/// The content-type for history segments (opaque blobs of bytes)
|
||||
pub(crate) const HISTORY_SEGMENT_CONTENT_TYPE: &str =
|
||||
@@ -16,3 +17,9 @@ pub(crate) const PARENT_VERSION_ID_HEADER: &str = "X-Parent-Version-Id";
|
||||
|
||||
/// The type containing a reference to the SyncServer object in the Actix state.
|
||||
pub(crate) type ServerState = Arc<Box<dyn SyncServer>>;
|
||||
|
||||
pub(crate) fn api_scope() -> Scope {
|
||||
web::scope("")
|
||||
.service(get_child_version::service)
|
||||
.service(add_version::service)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user