- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(customer): admin CRUD endpoints #6232
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
baeccb9
to
c37b269
Compare
a89165b
to
48f41e2
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.
some suggestions, but lgtm!
@IsOptional() | ||
email?: 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.
@IsOptional() | |
email?: string | |
email: string |
Should we change this here as well?
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 think so since this is an optional field in the validator right?
prevCustomers.map((c) => | ||
service.update(c.id, { | ||
first_name: c.first_name, | ||
last_name: c.last_name, | ||
email: c.email, | ||
phone: c.phone, | ||
metadata: c.metadata, | ||
}) |
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.
This might backfire if any of these attributes are not present in the data object itself. Nothing to do here for now, just FYI I'm working on a util to sanitize the data to the needed selects and relationships when reverting an update.
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.
Nice!
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.
LGTM!
Co-authored-by: Riqwan Thamir <[email protected]>
Co-authored-by: Riqwan Thamir <[email protected]>
Co-authored-by: Frane Polić <[email protected]>
Co-authored-by: Frane Polić <[email protected]>
Co-authored-by: Frane Polić <[email protected]>
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.
LGTM!
export const deleteCustomerStepId = "delete-customer" | ||
export const deleteCustomerStep = createStep( | ||
deleteCustomerStepId, |
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.
nit: Consistent with how other workflows and steps are named
export const deleteCustomerStepId = "delete-customer" | |
export const deleteCustomerStep = createStep( | |
deleteCustomerStepId, | |
export const deleteCustomersStepId = "delete-customer" | |
export const deleteCustomersStep = createStep( | |
deleteCustomerStepId, |
What
Including workflows for each.