Skip to content

Commit bb952d5

Browse files
committed
feat(router): remove robot text router handling
prefer fetching from a file in assets folder
1 parent 41ec8b8 commit bb952d5

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

Sources/App/Middlewares/SiteMiddleware.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ struct SiteMiddleware<Context: RequestContext>: RouterController {
3434
$0.currentRoute = route
3535
} operation: {
3636
switch route {
37-
case .robots:
38-
return ""
3937
case .home:
4038
return HomePage(codeLang: .resolve(req))
4139
case .api(.activity(.all)):

Sources/Routes/SiteRoute.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import URLRouting
55

66
@CasePathable
77
public enum SiteRoute: Sendable, Equatable {
8-
case robots
98
case home
109
case api(APIRoute)
1110

@@ -20,10 +19,6 @@ extension SiteRoute {
2019
OneOf {
2120
Route(.case(SiteRoute.home))
2221

23-
Route(.case(SiteRoute.robots)) {
24-
Path { "robots.txt" }
25-
}
26-
2722
Route(.case(SiteRoute.api)) {
2823
Path { "api" }
2924
APIRoute.Router()

0 commit comments

Comments
 (0)