diff --git a/cjpm.lock b/cjpm.lock index 71dcb68..468a97f 100644 --- a/cjpm.lock +++ b/cjpm.lock @@ -1,20 +1,20 @@ version = 0 [requires] - soulsoft_extensions_hosting = {version = "1.0.20260528"} - soulsoft_extensions_options_configuration = {version = "1.0.20260528"} soulsoft_web_http = {version = "1.0.20260528"} soulsoft_web_cors = {version = "1.0.20260528"} - soulsoft_extensions_options = {version = "1.0.20260528"} - soulsoft_web_routing = {version = "1.0.20260528"} - soulsoft_serialization = {version = "1.0.20260528"} + soulsoft_extensions_options_configuration = {version = "1.0.20260528"} soulsoft_extensions_logging = {version = "1.0.20260528"} - soulsoft_web_hosting = {version = "1.0.20260528"} + soulsoft_web_routing = {version = "1.0.20260528"} soulsoft_extensions_logging_console = {version = "1.0.20260528"} - soulsoft_net_http = {version = "1.0.20260528"} - soulsoft_web_mvc = {version = "1.0.20260528"} - soulsoft_extensions_logging_configuration = {version = "1.0.20260528"} - soulsoft_extensions_injection = {version = "1.0.20260528"} - redis = {version = "1.0.20260627"} + soulsoft_extensions_hosting = {version = "1.0.20260528"} soulsoft_extensions_configuration = {version = "1.0.20260528"} + soulsoft_extensions_logging_configuration = {version = "1.0.20260528"} + soulsoft_web_hosting = {version = "1.0.20260528"} + soulsoft_extensions_injection = {version = "1.0.20260528"} + soulsoft_net_http = {version = "1.0.20260528"} + soulsoft_extensions_options = {version = "1.0.20260528"} + soulsoft_web_mvc = {version = "1.0.20260528"} soulsoft_identity_claims = {version = "1.0.20260528"} + redis = {version = "1.0.20260627"} + soulsoft_serialization = {version = "1.0.20260528"} diff --git a/src/communications/SimApiBaseRequest.cj b/src/communications/SimApiBaseRequest.cj index 35e54ca..0cd0097 100644 --- a/src/communications/SimApiBaseRequest.cj +++ b/src/communications/SimApiBaseRequest.cj @@ -29,6 +29,12 @@ public class SimApiStringIdOnlyRequest { */ public class SimApiOneFieldRequest { public var data: ?T = None + + public init() {} + + public init(data: T) { + this.data = Some(data) + } } /** diff --git a/src/helpers/SimApiHttpClient.cj b/src/helpers/SimApiHttpClient.cj index b759047..970854a 100644 --- a/src/helpers/SimApiHttpClient.cj +++ b/src/helpers/SimApiHttpClient.cj @@ -86,7 +86,7 @@ public open class SimApiHttpClient { target = "${target}?${name}=${appId}" } let encrypted = aesEncrypt(body) - let req = "{\"data\":\"${encrypted}\"}" + let req = SimApiUtil.json(Some(SimApiOneFieldRequest(encrypted))) return query(target, req) } @@ -100,7 +100,7 @@ public open class SimApiHttpClient { */ public func aesSignQuery(url: String, body: String, queries!: HashMap = HashMap()): T { let encrypted = aesEncrypt(body) - let req = "{\"data\":\"${encrypted}\"}" + let req = SimApiUtil.json(Some(SimApiOneFieldRequest(encrypted))) return signQuery(url, body: req, queries: queries) }