Create Middleware for Control Panel Dashboard
Description
Now that we are starting development on the front-end of the control panel, we need to have a navigation guard that will only let logged in admins see the dashboard page. You can check out documentation around route guards here. We will probably want to do it per route to avoid the method being called at every navigation.
Spec
In this issue, we only need to create the middleware function that will get checked when a user navigates to the main control panel view. This code can live in a new middleware folder, src/middleware.
Copilot Prompts
Using Vue Router 3, show me how to implement a per-route navigation guard that executes a function.
How does Vue Router work?
How does routing on a single-page application differ from a server-side rendered web app?
Target Date: 12/31/2023 📆
Branch: issue-809
i'll try for the GET route
@E-wang42, as part of the issue metrics data collecting, there should be a branch called issue-809, which was created when you assigned yourself. You can see @Dunridge's comment above. Please use that branch because it will record information when a PR is made on that branch.
@E-wang42 are you far on the issue? Can I work on the issue with you if you are not close to finish yet?
hey Konny, i replied on Slack.