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

solution #101

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

solution #101

wants to merge 3 commits into from

Conversation

ArtemZakhar
Copy link

Hi)
Have a nice day)

Copy link

@DanilWeda DanilWeda 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!
I left a comment about using constants.
Many thanks)

Comment on lines 15 to 27
if (normalizedText === '/') {
await httpGetMainPage(res);

return;
}

const verifiedPath = httpVerifyRequest(res, normalizedText, method);

if (!verifiedPath) {
return;
}

if (method === 'POST' && normalizedText === '/compress') {

Choose a reason for hiding this comment

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

'/' and '/compress' move in constants.
Also, all methods ( 'POST' and others) move to constants.
Finally, move all statuses in constants. ( for all files)
Then use their in all files.
Thanks)

Copy link
Author

Choose a reason for hiding this comment

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

@DanilWeda I will make it on my laptop, because I like this approach, but I will not commit new changes)
Is it ok for you?

Tests work awful I am afraid to move something while the result is green)))

Copy link
Author

Choose a reason for hiding this comment

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

After the first attempt, I had 3 errors.
Then I did nothing and only one mistake is left)
But as you can see from the screen - everything works properly)

image

@ArtemZakhar
Copy link
Author

I have found the mistake. And have updated the code)

Copy link

@mrkovaliv mrkovaliv left a comment

Choose a reason for hiding this comment

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

👍 👍 👍

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.

4 participants