Skip to content

Commit ac5231d

Browse files
committed
Indentation to match project standards.
1 parent d19763e commit ac5231d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Sources/App/Controllers/Manage/LoginController.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ enum LoginController {
2424
let user = try req.content.decode(UserCreds.self)
2525
let response = try await cognito.authenticate(req: req, username: user.email, password: user.password)
2626
switch response {
27-
case .authenticated(let authenticatedResponse):
28-
let user = AuthenticatedUser(accessToken: authenticatedResponse.accessToken!)
29-
req.auth.login(user)
30-
case .challenged(_): // Cognito is not configured to send challenges, so we should never receive this response.
31-
break
27+
case .authenticated(let authenticatedResponse):
28+
let user = AuthenticatedUser(accessToken: authenticatedResponse.accessToken!)
29+
req.auth.login(user)
30+
case .challenged(_): // Cognito is not configured to send challenges, so we should never receive this response.
31+
break
3232
}
3333
return req.redirect(to: SiteURL.portal.relativeURL(), redirectType: .normal)
3434
} catch let error as SotoCognitoError {
3535
var model = Login.Model(errorMessage: "There was an error. Please try again.")
3636
switch error {
37-
case .unauthorized(let reason):
38-
model = Login.Model(errorMessage: reason ?? "There was an error. Please try again.")
39-
case .unexpectedResult(let reason):
40-
model = Login.Model(errorMessage: reason ?? "There was an error. Please try again.")
41-
case .invalidPublicKey:
42-
break
37+
case .unauthorized(let reason):
38+
model = Login.Model(errorMessage: reason ?? "There was an error. Please try again.")
39+
case .unexpectedResult(let reason):
40+
model = Login.Model(errorMessage: reason ?? "There was an error. Please try again.")
41+
case .invalidPublicKey:
42+
break
4343
}
4444
return Login.View(path: req.url.path, model: model).document().encodeResponse(status: .unauthorized)
4545
} catch let error as AWSClientError {

0 commit comments

Comments
 (0)