Drop optional, lastModified is non-optional
This commit is contained in:
parent
ceeda8c314
commit
5b016df7f3
|
@ -116,7 +116,7 @@ class InfrastructureFactory {
|
||||||
return infra
|
return infra
|
||||||
}
|
}
|
||||||
|
|
||||||
func update(_ name: Infrastructure.Name, notBeforeInterval minInterval: TimeInterval?, completionHandler: @escaping ((Infrastructure, Date?)?, Error?) -> Void) -> Bool {
|
func update(_ name: Infrastructure.Name, notBeforeInterval minInterval: TimeInterval?, completionHandler: @escaping ((Infrastructure, Date)?, Error?) -> Void) -> Bool {
|
||||||
let ifModifiedSince = modificationDate(for: name)
|
let ifModifiedSince = modificationDate(for: name)
|
||||||
|
|
||||||
if let lastInfrastructureUpdate = lastUpdate[name] {
|
if let lastInfrastructureUpdate = lastUpdate[name] {
|
||||||
|
@ -170,7 +170,7 @@ class InfrastructureFactory {
|
||||||
self.save(name, with: infra, lastModified: lastModified)
|
self.save(name, with: infra, lastModified: lastModified)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
completionHandler((infra, response.lastModified), nil)
|
completionHandler((infra, lastModified), nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue