Fix down status

This commit is contained in:
Elara 2020-11-15 01:43:27 -08:00
parent 7789ebc0f9
commit 7927b515f2

View File

@ -23,7 +23,7 @@ func routes(_ app: Application) throws {
URLSession.shared.dataTask(with: headReq, completionHandler: { (_, response, error) in URLSession.shared.dataTask(with: headReq, completionHandler: { (_, response, error) in
if let httpURLResponse = response as? HTTPURLResponse { if let httpURLResponse = response as? HTTPURLResponse {
statusDict["code"] = String(httpURLResponse.statusCode) statusDict["code"] = String(httpURLResponse.statusCode)
statusDict["down"] = httpURLResponse.statusCode != 200 ? "true" : "false" statusDict["down"] = "false"
} }
semaphore.signal() semaphore.signal()
}).resume() }).resume()