diff --git a/Sources/App/Subject/SubjectWebController.swift b/Sources/App/Subject/SubjectWebController.swift index ce71a6d..71dade8 100644 --- a/Sources/App/Subject/SubjectWebController.swift +++ b/Sources/App/Subject/SubjectWebController.swift @@ -27,9 +27,11 @@ final class SubjectWebController: RouteCollection { subject.get(use: details) let authRoutes = routes.grouped(RedirectMiddleware(path: "/login")) - authRoutes.get("edit", use: editSubject) - authRoutes.get("compendium", use: compendium) authRoutes.get("subjects", "create", use: createSubject) + + let authSubject = authRoutes.grouped("subjects", Subject.parameter) + authSubject.get("edit", use: editSubject) + authSubject.get("compendium", use: compendium) } func search(on req: Request) throws -> EventLoopFuture {