diff --git a/Sources/Application/Routes/WebClientRoutes.swift b/Sources/Application/Routes/WebClientRoutes.swift index d426ecd..be30a3c 100644 --- a/Sources/Application/Routes/WebClientRoutes.swift +++ b/Sources/Application/Routes/WebClientRoutes.swift @@ -54,7 +54,6 @@ func handleWebClient(request: RouterRequest, response: RouterResponse, next: @es slackRequestGroup.notify(queue: DispatchQueue.global(qos: .default), execute: { serveClientPage(channels: storedChannels, team: storedTeam, users: storedUserCount, response: response) }) -// slackRequestGroup.notify(queue: DispatchQueue.global(qos: .default), work: serveClientPage(channels: storedChannels, team: storedTeam, users: storedUserCount, response: response)) } catch let error { Log.error(error.localizedDescription) try! response.status(.internalServerError).render("error", context: ["error": "uncaught exception: \(error.localizedDescription)"]) @@ -71,11 +70,14 @@ private func serveClientPage(channels: [SlackChannel]?, team: SlackTeam?, users: try response.status(.internalServerError).render("error", context: ["error": "could not load team info"]) return } + var newUsers = (5, 40) + if let users = users { + newUsers = users + } // guard let users = users else { // try response.status(.internalServerError).render("Error", context: ["error": "could not load available user list"]) // return // } - let newUsers = (5, 40) let validList = channels.contains { element in return element.name == "general" } diff --git a/Views/home.stencil b/Views/home.stencil index ba447f3..9fbe63e 100644 --- a/Views/home.stencil +++ b/Views/home.stencil @@ -18,10 +18,10 @@
{{ usersOnline }} users online now out of {{ usersRegistered }} registered.