Skip to content

Commit

Permalink
Update StatsServiceRemoteV2.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
staskus committed Apr 23, 2024
1 parent 7980bb3 commit 78d3082
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/WordPressKit/Services/StatsServiceRemoteV2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,8 @@ public extension StatsServiceRemoteV2 {
let path = self.path(forEndpoint: "sites/\(siteID)/\(pathComponent)/", withVersion: ._1_1)
let properties = StatsEmailsSummaryData.queryProperties(quantity: quantity, sortField: sortField, sortOrder: sortOrder) as [String: AnyObject]

wordPressComRESTAPI.get(path, parameters: properties, success: { [weak self] (response, _) in
guard let self,
let jsonResponse = response as? [String: AnyObject],
wordPressComRESTAPI.get(path, parameters: properties, success: { (response, _) in
guard let jsonResponse = response as? [String: AnyObject],
let emailsSummaryData = StatsEmailsSummaryData(jsonDictionary: jsonResponse)
else {
completion(.failure(ResponseError.decodingFailure))
Expand Down

0 comments on commit 78d3082

Please sign in to comment.