Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.
Casper Rasmussen edited this page Jan 6, 2017 · 4 revisions

Create public routes

drop.group(collection: Middlewares.unsecured) { unsecured in
    unsecured.grouped("/").collection(LoginRoutes(droplet: drop, config: AdminPanel.Configuration.shared!))
}

Create protected routes (requires to be logged in)

drop.group(collection: Middlewares.secured) { secured in
    secured.grouped("/admin/dashboard").collection(DashboardRoutes(droplet: drop))
    secured.grouped("/admin/backend_users").collection(BackendUsersRoutes(droplet: drop))
    secured.grouped("/admin/backend_users/roles").collection(BackendUserRolesRoutes(droplet: drop))
}
Clone this wiki locally