auth
This commit is contained in:
parent
fe8f570fd0
commit
b12622219a
@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
struct ServerResponseIdToken: Decodable {
|
||||
public let items: IdToken
|
||||
public let items: [IdToken]
|
||||
|
||||
public struct IdToken: Decodable {
|
||||
public let id: String
|
||||
|
@ -55,7 +55,7 @@ public final class NetworkUser: NetworkUserProtocol {
|
||||
public func getIdToken(token: String) async throws -> String {
|
||||
let data = try await baseUrl.execute(path: URLS.getIdToken, method: .get, headers: Headers.headerWithToken(token: token), parameters: nil)
|
||||
let tokenID = try JSONDecoder().decode(ServerResponseIdToken.self, from: data)
|
||||
return tokenID.items.id
|
||||
return tokenID.items.first!.id
|
||||
}
|
||||
|
||||
public func deleteUser(idToken: String, token: String) async throws {
|
||||
|
Loading…
x
Reference in New Issue
Block a user