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

done #246

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

done #246

wants to merge 2 commits into from

Conversation

2pasha
Copy link

@2pasha 2pasha commented Jun 4, 2024

test: are tests working?

Copy link

@DarkMistyRoom DarkMistyRoom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! Just check the comments

};

const getOne = async (req, res) => {
const { id } = req.params;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if id was passed


const getOne = async (req, res) => {
const { id } = req.params;
const user = await userServices.getById(id);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also would be great to handle errors on this statge

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applicable to all service requests

Comment on lines 47 to 48
const { id } = req.params;
const { name } = req.body;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better to validate received data immediately after receiving

@2pasha 2pasha requested a review from DarkMistyRoom June 5, 2024 07:55
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

Successfully merging this pull request may close these issues.

2 participants