-
Notifications
You must be signed in to change notification settings - Fork 1
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
1862 - refine multi zone routing #1884
Conversation
9c5318e
to
075e862
Compare
import { NextURL } from "next/dist/server/web/next-url"; | ||
import { NextFetchEvent, NextRequest, NextResponse } from "next/server"; | ||
import { instance, mock, reset, when } from "ts-mockito"; | ||
import middleware from "../middleware"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this is testing bciers/apps/dashboard/middleware.ts
though this currently is the only middleware and all the tests are about this so I thought this made more sense. Also I wasn't sure how to just test this withAuthorization
function on its own but found examples online of how to test the NextJS middleware stack.
93b9367
to
601e587
Compare
email?: string; | ||
phone_number?: string; | ||
app_role?: { role_name: string }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we need the UserProfileFormData
and UserProfilePartialFormData
interfaces defined again here when they're already defined in bciers/libs/shared/types/src/form/formData.ts ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed!
77f04da
to
e91fd90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that everything works peachy when I actually set up my local env properly... 🙃
155554b
to
9a45e39
Compare
PR to bring in some updates from #1862 that weren't brought in with #1867
View #1867 for some more context on this though what I've brought in this PR:
withAuthorization
middlewaresactions
project, update imports