28 lines
491 B
Swift
28 lines
491 B
Swift
import Foundation
|
|
|
|
struct APIResponse<T: Decodable>: Decodable {
|
|
let status: String
|
|
let data: T
|
|
let detail: String?
|
|
}
|
|
|
|
struct TokenPairPayload: Decodable {
|
|
let access_token: String
|
|
let refresh_token: String
|
|
let user_id: String?
|
|
}
|
|
|
|
struct RegisterPayload: Decodable {
|
|
let message: String
|
|
}
|
|
|
|
struct ErrorPayload: Decodable {
|
|
let message: String?
|
|
}
|
|
|
|
struct ErrorResponse: Decodable {
|
|
let status: String?
|
|
let data: ErrorPayload?
|
|
let detail: String?
|
|
}
|