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] /// Deletes an API call by [id]
func deleteById(_ id: String) { func deleteById(_ id: String) {
self.items.removeAll(where: { $0.id == id }) 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 self._hasChanged = true
} }

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

Loading…
Cancel
Save