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

Commit 75451ba

Browse files
committed
Use WordPressComRESTAPIInterfacing in TimeZoneServiceRemote
1 parent 2c1aea3 commit 75451ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/WordPressKit/Services/TimeZoneServiceRemote.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class TimeZoneServiceRemote: ServiceRemoteWordPressComREST {
99
public func getTimezones(success: @escaping (([TimeZoneGroup]) -> Void), failure: @escaping ((Error) -> Void)) {
1010
let endpoint = "timezones"
1111
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)
12-
wordPressComRestApi.GET(path, parameters: nil, success: { (response, _) in
12+
wordPressComRESTAPI.get(path, parameters: nil, success: { (response, _) in
1313
do {
1414
let groups = try self.timezoneGroupsFromResponse(response)
1515
success(groups)
@@ -23,7 +23,7 @@ public class TimeZoneServiceRemote: ServiceRemoteWordPressComREST {
2323
}
2424

2525
private extension TimeZoneServiceRemote {
26-
func timezoneGroupsFromResponse(_ response: AnyObject) throws -> [TimeZoneGroup] {
26+
func timezoneGroupsFromResponse(_ response: Any) throws -> [TimeZoneGroup] {
2727
guard let response = response as? [String: Any],
2828
let timeZonesByContinent = response["timezones_by_continent"] as? [String: [[String: String]]],
2929
let manualUTCOffsets = response["manual_utc_offsets"] as? [[String: String]] else {

0 commit comments

Comments
 (0)