You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.0 KiB
44 lines
1.0 KiB
//
|
|
// FailedAPICall.swift
|
|
// LeStorage
|
|
//
|
|
// Created by Laurent Morvillier on 31/05/2024.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class FailedAPICall: ModelObject, Storable {
|
|
|
|
static func resourceName() -> String { return "failed-api-calls" }
|
|
static func tokenExemptedMethods() -> [HTTPMethod] { return [] }
|
|
static func filterByStoreIdentifier() -> Bool { return false }
|
|
|
|
var id: String = Store.randomId()
|
|
|
|
/// The creation date of the call
|
|
var date: Date = Date()
|
|
|
|
/// The id of the API call
|
|
var callId: String
|
|
|
|
/// The type of the call
|
|
var type: String
|
|
|
|
/// The JSON representation of the API call
|
|
var apiCall: String
|
|
|
|
/// The server error
|
|
var error: String
|
|
|
|
/// The authentication header
|
|
var authentication: String?
|
|
|
|
init(callId: String, type: String, apiCall: String, error: String, authentication: String?) {
|
|
self.callId = callId
|
|
self.type = type
|
|
self.apiCall = apiCall
|
|
self.error = error
|
|
self.authentication = authentication
|
|
}
|
|
|
|
}
|
|
|