Skip to content

Commit b9f84b9

Browse files
committed
Update path
1 parent e89bad0 commit b9f84b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Networking/Networking/Remote/IPLocationRemote.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ public final class IPLocationRemote: Remote {
77
/// Fetches the country code from the device ip.
88
///
99
public func getIPCountryCode(onCompletion: @escaping (Result<String, Error>) -> Void) {
10-
let path = "geo"
11-
guard let url = URL(string: "\(Settings.wordpressApiBaseURL)/\(path)") else {
10+
let path = "geo/" // Needs the trailing slash otherwise the request will fail.
11+
guard let url = URL(string: Settings.wordpressApiBaseURL + path) else {
1212
return onCompletion(.failure(IPLocationError.malformedURL)) // Should not happen.
1313
}
1414

0 commit comments

Comments
 (0)