fix
This commit is contained in:
		| @@ -194,14 +194,12 @@ NLOHMANN_JSON_NAMESPACE_BEGIN | ||||
| template <> struct adl_serializer<repertory::remote::remote_config> { | ||||
|   static void to_json(json &data, | ||||
|                       const repertory::remote::remote_config &value) { | ||||
|     data = { | ||||
|         {"ApiPort", value.api_port}, | ||||
|         {"EncryptionToken", value.encryption_token}, | ||||
|         {"HostNameOrIp", value.host_name_or_ip}, | ||||
|         {"MaxConnections", value.max_connections}, | ||||
|         {"ReceiveTimeoutMs", value.recv_timeout_ms}, | ||||
|         {"SendTimeoutMs", value.send_timeout_ms}, | ||||
|     }; | ||||
|     data["ApiPort"] = value.api_port; | ||||
|     data["EncryptionToken"] = value.encryption_token; | ||||
|     data["HostNameOrIp"] = value.host_name_or_ip; | ||||
|     data["MaxConnections"] = value.max_connections; | ||||
|     data["ReceiveTimeoutMs"] = value.recv_timeout_ms; | ||||
|     data["SendTimeoutMs"] = value.send_timeout_ms; | ||||
|   } | ||||
|  | ||||
|   static void from_json(const json &data, | ||||
|   | ||||
| @@ -403,13 +403,11 @@ using meta_provider_callback = std::function<void(directory_item &)>; | ||||
| NLOHMANN_JSON_NAMESPACE_BEGIN | ||||
| template <> struct adl_serializer<repertory::directory_item> { | ||||
|   static void to_json(json &data, const repertory::directory_item &value) { | ||||
|     data = { | ||||
|         {"ApiParent", value.api_parent}, | ||||
|         {"ApiPath", value.api_path}, | ||||
|         {"Directory", value.directory}, | ||||
|         {"Meta", value.meta}, | ||||
|         {"Size", value.size}, | ||||
|     }; | ||||
|     data["ApiParent"] = value.api_parent; | ||||
|     data["ApiPath"] = value.api_path; | ||||
|     data["Directory"] = value.directory; | ||||
|     data["Meta"] = value.meta; | ||||
|     data["Size"] = value.size; | ||||
|   } | ||||
|  | ||||
|   static void from_json(const json &data, repertory::directory_item &value) { | ||||
| @@ -423,10 +421,8 @@ template <> struct adl_serializer<repertory::directory_item> { | ||||
|  | ||||
| template <> struct adl_serializer<repertory::encrypt_config> { | ||||
|   static void to_json(json &data, const repertory::encrypt_config &value) { | ||||
|     data = { | ||||
|         {"EncryptionToken", value.encryption_token}, | ||||
|         {"Path", value.path}, | ||||
|     }; | ||||
|     data["EncryptionToken"] = value.encryption_token; | ||||
|     data["Path"] = value.path; | ||||
|   } | ||||
|  | ||||
|   static void from_json(const json &data, repertory::encrypt_config &value) { | ||||
| @@ -437,16 +433,14 @@ template <> struct adl_serializer<repertory::encrypt_config> { | ||||
|  | ||||
| template <> struct adl_serializer<repertory::host_config> { | ||||
|   static void to_json(json &data, const repertory::host_config &value) { | ||||
|     data = { | ||||
|         {"AgentString", value.agent_string}, | ||||
|         {"ApiPassword", value.api_password}, | ||||
|         {"ApiPort", value.api_port}, | ||||
|         {"ApiUser", value.api_user}, | ||||
|         {"HostNameOrIp", value.host_name_or_ip}, | ||||
|         {"Path", value.path}, | ||||
|         {"Protocol", value.protocol}, | ||||
|         {"TimeoutMs", value.timeout_ms}, | ||||
|     }; | ||||
|     data["AgentString"] = value.agent_string; | ||||
|     data["ApiPassword"] = value.api_password; | ||||
|     data["ApiPort"] = value.api_port; | ||||
|     data["ApiUser"] = value.api_user; | ||||
|     data["HostNameOrIp"] = value.host_name_or_ip; | ||||
|     data["Path"] = value.path; | ||||
|     data["Protocol"] = value.protocol; | ||||
|     data["TimeoutMs"] = value.timeout_ms; | ||||
|   } | ||||
|  | ||||
|   static void from_json(const json &data, repertory::host_config &value) { | ||||
| @@ -463,17 +457,15 @@ template <> struct adl_serializer<repertory::host_config> { | ||||
|  | ||||
| template <> struct adl_serializer<repertory::s3_config> { | ||||
|   static void to_json(json &data, const repertory::s3_config &value) { | ||||
|     data = { | ||||
|         {"AccessKey", value.access_key}, | ||||
|         {"Bucket", value.bucket}, | ||||
|         {"EncryptionToken", value.encryption_token}, | ||||
|         {"Region", value.region}, | ||||
|         {"SecretKey", value.secret_key}, | ||||
|         {"TimeoutMs", value.timeout_ms}, | ||||
|         {"URL", value.url}, | ||||
|         {"UsePathStyle", value.use_path_style}, | ||||
|         {"UseRegionInURL", value.use_region_in_url}, | ||||
|     }; | ||||
|     data["AccessKey"] = value.access_key; | ||||
|     data["Bucket"] = value.bucket; | ||||
|     data["EncryptionToken"] = value.encryption_token; | ||||
|     data["Region"] = value.region; | ||||
|     data["SecretKey"] = value.secret_key; | ||||
|     data["TimeoutMs"] = value.timeout_ms; | ||||
|     data["URL"] = value.url; | ||||
|     data["UsePathStyle"] = value.use_path_style; | ||||
|     data["UseRegionInURL"] = value.use_region_in_url; | ||||
|   } | ||||
|  | ||||
|   static void from_json(const json &data, repertory::s3_config &value) { | ||||
| @@ -491,9 +483,7 @@ template <> struct adl_serializer<repertory::s3_config> { | ||||
|  | ||||
| template <> struct adl_serializer<repertory::sia_config> { | ||||
|   static void to_json(json &data, const repertory::sia_config &value) { | ||||
|     data = { | ||||
|         {"Bucket", value.bucket}, | ||||
|     }; | ||||
|     data["Bucket"] = value.bucket; | ||||
|   } | ||||
|  | ||||
|   static void from_json(const json &data, repertory::sia_config &value) { | ||||
|   | ||||
| @@ -275,6 +275,7 @@ auto app_config::get_json() const -> json { | ||||
|     ret.erase("EnableChunkDownloaderTimeout"); | ||||
|     ret.erase("EncryptConfig"); | ||||
|     ret.erase("EvictionDelayMinutes"); | ||||
|     ret.erase("EvictionUsesAccessedTime"); | ||||
|     ret.erase("HighFreqIntervalSeconds"); | ||||
|     ret.erase("HostConfig"); | ||||
|     ret.erase("LowFreqIntervalSeconds"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user