From bbf3cd6974b61f272e0bbe78648b09ffc7782de9 Mon Sep 17 00:00:00 2001 From: Pavel Lukandiy Date: Thu, 7 Dec 2017 19:12:29 +0300 Subject: [PATCH] Updated typical api response --- CHANGELOG.md | 3 +++ LeadKitAdditions.podspec | 2 +- LeadKitAdditions/Sources/Classes/ApiResponse.swift | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 526a76d..7025f68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.1.3 +- **Update**: Typical api response keys naming + ## 0.1.2 - **Update**: Access modifiers of `ValidationService` diff --git a/LeadKitAdditions.podspec b/LeadKitAdditions.podspec index 4e81670..c015803 100644 --- a/LeadKitAdditions.podspec +++ b/LeadKitAdditions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKitAdditions" - s.version = "0.1.2" + s.version = "0.1.3" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions" s.license = "Apache License, Version 2.0" diff --git a/LeadKitAdditions/Sources/Classes/ApiResponse.swift b/LeadKitAdditions/Sources/Classes/ApiResponse.swift index 73dfc71..98773b5 100644 --- a/LeadKitAdditions/Sources/Classes/ApiResponse.swift +++ b/LeadKitAdditions/Sources/Classes/ApiResponse.swift @@ -34,8 +34,8 @@ public class ApiResponse: ApiResponseProtocol, ImmutableMappable { public required init(map: Map) throws { result = try? map.value("result") - errorCode = try map.value("error_code") - errorMessage = try? map.value("error_message") + errorCode = try map.value("errorCode") + errorMessage = try? map.value("errorMessage") } }