Open
Conversation
16 tasks
nani-samireddy
requested changes
Jul 15, 2024
Member
nani-samireddy
left a comment
There was a problem hiding this comment.
Looks Good some small changes needed
Comment on lines
+169
to
+187
| if (req.body.isDefault !== undefined) address.isDefault = req.body.isDefault; | ||
| if (req.body.name !== undefined) address.name = req.body.name; | ||
| if (req.body.email !== undefined) address.contact.email = req.body.email; | ||
| if (req.body.phone !== undefined) address.contact.phone = req.body.phone; | ||
|
|
||
| if (req.body.doorNo !== undefined) address.address.doorNo = req.body.doorNo; | ||
| if (req.body.street !== undefined) address.address.street = req.body.street; | ||
| if (req.body.city !== undefined) address.address.city = req.body.city; | ||
| if (req.body.state !== undefined) address.address.state = req.body.state; | ||
| if (req.body.zip !== undefined) address.address.zip = req.body.zip; | ||
| if (req.body.coordinates !== undefined) address.address.location.coordinates = req.body.coordinates; | ||
|
|
||
| if (req.body.additionalInstructions !== undefined) { | ||
| address.additionalInstructions = req.body.additionalInstructions; | ||
| } | ||
| if (req.body.additionalInstructions !== undefined) { | ||
| address.additionalInstructions = req.body.additionalInstructions; | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Looks like more hardcoded way. Can we have a validator in the mongoose model?
| import SudoUser from "../Sudouser/sudouser-model"; | ||
| import jwt, { JwtPayload } from "jsonwebtoken" | ||
|
|
||
| export const verifyAuthOrSudo = expressAsyncHandler( |
Member
There was a problem hiding this comment.
Change the name to more informative something like allowSudoUserOrVerifiedUser
Try to name them in way that people can easily understand by reading the name
Member
|
@eswarmamidi19 Please review the changes once in this PR and add comments if any changes are required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Done with the address issue