Skip to content

Commit

Permalink
Update API Version
Browse files Browse the repository at this point in the history
fix #169
  • Loading branch information
Black-Fox-2022 committed May 21, 2024
1 parent 4c76ef5 commit 57dc6e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions APIClient/APIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ final class APIClient: ObservableObject {
}

extension APIClient {

func login(loginRequestBody: LoginRequestBody, callback: @escaping (Bool) -> Void) {
let url = urlForPath("users", "login")
let url = urlForPath(apiVersion: .v3,"users", "login")

var request = URLRequest(url: url)
request.httpMethod = "POST"
Expand All @@ -103,7 +104,6 @@ extension APIClient {
URLSession.shared.dataTask(with: request) { data, _, _ in
if let data = data {
print(String(decoding: data, as: UTF8.self))

if let decodedResponse = try? JSONDecoder.telemetryDecoder.decode(UserTokenDTO.self, from: data) {
DispatchQueue.main.async {
self.userToken = decodedResponse
Expand Down

0 comments on commit 57dc6e3

Please sign in to comment.