November 2018
Intermediate to advanced
404 pages
10h 16m
English
You need to add several new routes to manage your admin account. For that, use securedRouter to add another group of routes that handle admin accounts.
Add the following routes right under the protected routes for adminRouter:
// protected routes: accountslet accountRouter = securedRouter.grouped("journal/account")accountRouter.get("all", use: getAccounts)accountRouter.get("add", use: addAccount)accountRouter.post("new", use: newAccount)accountRouter.get(Int.parameter, "remove", use: removeAccount)
There are four protected routes in the securedRouter route group. They are used to manage the administrative accounts in your myJournal application.
Read now
Unlock full access