Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Middleware for Control Panel Dashboard #809

Open
DietBepis1 opened this issue Nov 24, 2023 · 5 comments
Open

Create Middleware for Control Panel Dashboard #809

DietBepis1 opened this issue Nov 24, 2023 · 5 comments
Assignees

Comments

@DietBepis1
Copy link
Collaborator

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 📆

@E-wang42 E-wang42 self-assigned this Nov 24, 2023
@Dunridge
Copy link
Collaborator

Branch: issue-809

@E-wang42
Copy link
Collaborator

i'll try for the GET route

@DietBepis1
Copy link
Collaborator Author

@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.

@KonnyGuo
Copy link
Collaborator

@E-wang42 are you far on the issue? Can I work on the issue with you if you are not close to finish yet?

@E-wang42
Copy link
Collaborator

E-wang42 commented Dec 1, 2023

hey Konny, i replied on Slack.

@KonnyGuo KonnyGuo self-assigned this Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants