0% found this document useful (0 votes)
26 views

Jeet Code Review

Uploaded by

evanzandu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Jeet Code Review

Uploaded by

evanzandu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Points to be resolved in code

1. Jeet

what is the use of session here in api side?


Why you write jwt token logic here not in repository?
Why api always return ok even if it gets failed? Check for all the api’s
Make enum of every response message you use and use it here , don’t use hardcoded response
messages

again don’t use any logic in controller write all the logic in repository
Use method name ,api endpoint name and region name same so that we can identify methods easily

remove unnecessary classes


use same name in controller,service,repository all three for every methods which have different name

Make separate enum file for this type of value


You can write like this instead of this
Why this methods don’t have try catch block?
Why this method don’t return any thing? You have to return Ok or bad request or etc…. from here to
the controller and then you have to return it to front-end

Make different helper class for that subject and body and also for link and fetch it here from that
helper so that we can prevent redundant code and code looks cleaner also

don’t use this values static here rather than write hardcoded here shift this static values into
appsetting.json file and fetch it from here by dependency injection of context
Make separate email helper for this email sending method and call it here pass this params by calling
that helper method

Remove unnecessay comments


Return ok or any error from here also in catch block

Try to implement this type of response in every methods and in repository not in controller

You might also like