From b00f0826b98a79031d8f4a423292958c7b26a27e Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Tue, 11 Oct 2022 12:07:41 +0200 Subject: [PATCH] Fix indentation --- Sources/App/routes.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/App/routes.swift b/Sources/App/routes.swift index 2255fbb..3151ce3 100644 --- a/Sources/App/routes.swift +++ b/Sources/App/routes.swift @@ -82,8 +82,8 @@ func deletePlayer(_ app: Application) { app.post("player", "delete", ":name") { req -> EventLoopFuture in guard let name = req.parameters.get("name"), let password = req.body.string else { - throw Abort(.badRequest) // 400 - } + throw Abort(.badRequest) // 400 + } return server.passwordHashForExistingPlayer(named: name, in: req.db) .guard({ hash in (try? req.password.verify(password, created: hash)) ?? false @@ -107,8 +107,8 @@ func loginPlayer(_ app: Application) { app.post("player", "login", ":name") { req -> EventLoopFuture in guard let name = req.parameters.get("name"), let password = req.body.string else { - throw Abort(.badRequest) // 400 - } + throw Abort(.badRequest) // 400 + } return server.passwordHashForExistingPlayer(named: name, in: req.db) .guard({ hash in (try? req.password.verify(password, created: hash)) ?? false @@ -270,8 +270,8 @@ func joinTable(_ app: Application) { guard let string = req.parameters.get("table"), let table = UUID(uuidString: string), let token = req.body.string else { - throw Abort(.badRequest) - } + throw Abort(.badRequest) + } return server.join(tableId: table, playerToken: token, in: req.db) .flatMapThrowing(encodeJSON) }