Refactor HTTP implementation of API methods

This commit is contained in:
Dustin J. Mitchell
2020-11-26 11:32:20 -05:00
parent a5c06008b3
commit e84871931f
8 changed files with 100 additions and 30 deletions

View File

@@ -4,5 +4,15 @@ use std::sync::Arc;
pub(crate) mod add_version;
pub(crate) mod get_child_version;
/// The content-type for history segments (opaque blobs of bytes)
pub(crate) const HISTORY_SEGMENT_CONTENT_TYPE: &str =
"application/vnd.taskchampion.history-segment";
/// The header names for version ID
pub(crate) const VERSION_ID_HEADER: &str = "X-Version-Id";
/// The header names for parent version ID
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>>;