Fix down status
This commit is contained in:
parent
7789ebc0f9
commit
7927b515f2
@ -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()
|
||||||
|
Reference in New Issue
Block a user