Skip to content

Commit

Permalink
Match API property name.
Browse files Browse the repository at this point in the history
  • Loading branch information
twstokes committed May 19, 2022
1 parent 0583f7b commit 3a6aa8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WordPressKit/RemoteSiteDesign.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public struct RemoteSiteDesign: Codable {
public let mobileScreenshot: String?
public let tabletScreenshot: String?
public let themeSlug: String?
public let groups: [String]?
public let group: [String]?
public let segmentID: Int64?
public let categories: [RemoteSiteDesignCategory]

Expand All @@ -45,7 +45,7 @@ public struct RemoteSiteDesign: Codable {
case mobileScreenshot = "preview_mobile"
case tabletScreenshot = "preview_tablet"
case themeSlug = "theme"
case groups
case group
case segmentID = "segment_id"
case categories
}
Expand All @@ -59,7 +59,7 @@ public struct RemoteSiteDesign: Codable {
mobileScreenshot = try? map.decode(String.self, forKey: .mobileScreenshot)
tabletScreenshot = try? map.decode(String.self, forKey: .tabletScreenshot)
themeSlug = try? map.decode(String.self, forKey: .themeSlug)
groups = try? map.decode([String].self, forKey: .groups)
group = try? map.decode([String].self, forKey: .group)
segmentID = try? map.decode(Int64.self, forKey: .segmentID)
categories = try map.decode([RemoteSiteDesignCategory].self, forKey: .categories)
}
Expand Down

0 comments on commit 3a6aa8c

Please sign in to comment.