From aa78348e98214e4bb5696273c12946c00f4de155 Mon Sep 17 00:00:00 2001 From: Laurent Date: Mon, 7 Oct 2024 10:49:13 +0200 Subject: [PATCH] Fixes coding issues --- LeStorage/Codables/ApiCall.swift | 2 +- LeStorage/Services.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LeStorage/Codables/ApiCall.swift b/LeStorage/Codables/ApiCall.swift index fbd5ccb..9eb7752 100644 --- a/LeStorage/Codables/ApiCall.swift +++ b/LeStorage/Codables/ApiCall.swift @@ -22,7 +22,7 @@ class ApiCall: ModelObject, Storable, SomeCall { var id: String = Store.randomId() /// Creation date of the call - var creationDate: Date = Date() + var creationDate: Date? = Date() /// The HTTP method of the call: post... var method: HTTPMethod diff --git a/LeStorage/Services.swift b/LeStorage/Services.swift index 4a4db8b..4fd0be2 100644 --- a/LeStorage/Services.swift +++ b/LeStorage/Services.swift @@ -394,7 +394,7 @@ public class Services { let tokenString = deviceToken.map { String(format: "%02x", $0) }.joined() let token = DeviceToken(value: tokenString) // Logger.log("Send device token = \(tokenString)") - let _: DeviceToken = try await self._runRequest(serviceCall: postDeviceTokenCall, payload: token) + let _: Empty = try await self._runRequest(serviceCall: postDeviceTokenCall, payload: token) } /// A method that sends a request to change a user's password