Adds creationDate on ApiCall

sync2
Laurent 1 year ago
parent e02b12e8e2
commit 30306d2d50
  1. 2
      LeStorage/ApiCallCollection.swift
  2. 5
      LeStorage/Codables/ApiCall.swift

@ -99,7 +99,7 @@ actor ApiCallCollection<T: Storable>: SomeCallCollection {
/// Deletes an API call by [id]
func deleteById(_ id: String) {
self.items.removeAll(where: { $0.id == id })
Logger.log("\(T.resourceName()) > Delete by id, count after deletion = \(self.items.count)")
// Logger.log("\(T.resourceName()) > Delete by id, count after deletion = \(self.items.count)")
self._hasChanged = true
}

@ -21,8 +21,8 @@ class ApiCall<T: Storable>: ModelObject, Storable, SomeCall {
var id: String = Store.randomId()
/// The http URL of the call
// var url: String
/// Creation date of the call
var creationDate: Date = Date()
/// The HTTP method of the call: post...
var method: HTTPMethod
@ -40,7 +40,6 @@ class ApiCall<T: Storable>: ModelObject, Storable, SomeCall {
var lastAttemptDate: Date = Date()
init(method: HTTPMethod, dataId: String, body: String) {
// self.url = url
self.method = method
self.dataId = dataId
self.body = body

Loading…
Cancel
Save