Skip to content

Commit

Permalink
Merge pull request #172 from TelemetryDeck/Ticket-169
Browse files Browse the repository at this point in the history
Update API Version
  • Loading branch information
Black-Fox-2022 authored May 21, 2024
2 parents 4c76ef5 + 57dc6e3 commit f60fd8c
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 f60fd8c

Please sign in to comment.