Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 423a5f0

Browse files
committed
Provide default values to resolveStatus and noWPCOM
1 parent 2ffb9e2 commit 423a5f0

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

WordPressKit/Domains/DomainsServiceRemote+AllDomains.swift

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ extension DomainsServiceRemote {
5555

5656
public struct AllDomainsEndpointParams {
5757

58-
public var resolveStatus: Bool?
58+
public var resolveStatus: Bool = false
59+
public var noWPCOM: Bool = false
5960
public var locale: String?
60-
public var noWPCOM: Bool?
6161

6262
public init() {}
6363
}
@@ -118,15 +118,9 @@ extension DomainsServiceRemote.AllDomainsEndpointParams: Encodable {
118118

119119
public func encode(to encoder: Encoder) throws {
120120
var container = encoder.container(keyedBy: CodingKeys.self)
121-
if let resolveStatus {
122-
try container.encodeIfPresent("\(resolveStatus)", forKey: .resolveStatus)
123-
}
124-
if let locale {
125-
try container.encodeIfPresent(locale, forKey: .locale)
126-
}
127-
if let noWPCOM {
128-
try container.encodeIfPresent("\(noWPCOM)", forKey: .noWPCOM)
129-
}
121+
try container.encode("\(resolveStatus)", forKey: .resolveStatus)
122+
try container.encode("\(noWPCOM)", forKey: .noWPCOM)
123+
try container.encodeIfPresent(locale, forKey: .locale)
130124
}
131125
}
132126

0 commit comments

Comments
 (0)