Skip to content

Commit

Permalink
Fix some page references and page redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
mattesmohr committed Jul 29, 2024
1 parent a50340b commit 91793db
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct AssetAdminController {
try await AssetRepository(database: request.db)
.insert(entity: AssetEntity(input: model))

return request.redirect(to: "/area/admin/assets/index")
return request.redirect(to: "/area/admin/assets")
}

// [/:id/edit]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct LoginAreaController {
request.auth.logout(UserModel.Output.self)
request.session.unauthenticate(UserModel.Output.self)

return request.redirect(to: "/area/login")
return request.redirect(to: "/area/login/login")
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Website/Setup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ enum Setup {

try routes.group("admin") { routes in

let group = routes.grouped(UserSessionAuthenticator(), UserModel.Output.redirectMiddleware(path: "/area/login/index"))
let group = routes.grouped(UserSessionAuthenticator(), UserModel.Output.redirectMiddleware(path: "/area/login"))

try group.register(collection: HomeAdminController())
try group.register(collection: ProjectAdminController())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct AssetList: View {
.lineLimit(.one)
Dropdown {
List(direction: .vertical) {
Link(destination: "/area/admin/assets/edit/\(asset.id)") {
Link(destination: "/area/admin/assets/\(asset.id)/edit") {
Symbol(system: .pencil)
Text {
"Edit"
Expand Down
4 changes: 2 additions & 2 deletions Sources/Website/Views/Shared/ViewContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ struct ViewContainer: View {
Footer {
HStack(spacing: .between) {
List(direction: .horizontal) {
Link(destination: "/home/index") {
Link(destination: "/home") {
Text {
"DE"
}
}
Link(destination: "/home/index") {
Link(destination: "/home") {
Text {
"EN"
}
Expand Down

0 comments on commit 91793db

Please sign in to comment.