Skip to content

Commit 0ddb07f

Browse files
committed
renaming
1 parent 82f6b93 commit 0ddb07f

10 files changed

+4
-6
lines changed

Sources/App/Controllers/Portal/DeleteAccountController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ enum DeleteAccountController {
1818
req.session.destroy()
1919
return req.redirect(to: SiteURL.home.relativeURL())
2020
} catch {
21-
return Portal.View(path: SiteURL.portal.relativeURL(), model: Portal.Model(errorMessage: "An unknown error occurred: \(error.localizedDescription)")).document().encodeResponse(status: .internalServerError)
21+
return PortalPage.View(path: SiteURL.portal.relativeURL(), model: PortalPage.Model(errorMessage: "An unknown error occurred: \(error.localizedDescription)")).document().encodeResponse(status: .internalServerError)
2222
}
2323
}
2424
}

Sources/App/Controllers/Portal/PortalController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import SotoCognitoAuthenticationKit
66
enum PortalController {
77
@Sendable
88
static func show(req: Request) async throws -> HTML {
9-
return Portal.View(path: req.url.path, model: Portal.Model()).document()
9+
return PortalPage.View(path: req.url.path, model: PortalPage.Model()).document()
1010
}
1111
}

Sources/App/Controllers/Portal/SessionAuthentication.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ struct UserSessionAuthenticator: AsyncSessionAuthenticator {
2121
try await cognito.authenticateToken(req: request, sessionID: sessionID, accessToken: sessionID)
2222
request.auth.login(User(accessToken: sessionID))
2323
} catch _ as SotoCognitoError {
24-
// TODO: .unauthorized SotoCognitoError with reason "invalid token", attempt to refresh using
25-
// req.application.cognito.authenticatable.refresh(), which requires the username and refresh
26-
// token, both returned upon initial successful login.
24+
// TODO: .unauthorized SotoCognitoError with reason "invalid token", attempt to refresh using req.application.cognito.authenticatable.refresh(), which requires the username and refresh token, both returned upon initial successful login.
2725
}
2826
}
2927
typealias User = AuthenticatedUser
File renamed without changes.
File renamed without changes.

Sources/App/Views/Manage/Portal+View.swift renamed to Sources/App/Views/Portal/Portal+View.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Plot
22
import Foundation
33

4-
enum Portal {
4+
enum PortalPage {
55

66
struct Model {
77
var errorMessage: String = ""
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)