Skip to content
This repository was archived by the owner on Apr 2, 2020. It is now read-only.

Validation#9

Merged
tomusdrw merged 5 commits into
masterfrom
td-validation2
Feb 12, 2018
Merged

Validation#9
tomusdrw merged 5 commits into
masterfrom
td-validation2

Conversation

@tomusdrw
Copy link
Copy Markdown
Contributor

@tomusdrw tomusdrw commented Feb 8, 2018

Supersedes #8

Copy link
Copy Markdown

@ngotchac ngotchac left a comment

Choose a reason for hiding this comment

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

One small question/remark, otherwise LGTM

Comment thread server.js

if (!enabledTracks[track]) {
throw new Error(`Track not enabled: ${track}`);
throw boom.accepted(`Track not enabled: ${track}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That's not an error, right? Why using boom as such? You could just use res to send an early response.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is an error, but I want to return a specific status code in such case. Also I want to separate validation&logic from dealing with req/res directly.

@tomusdrw tomusdrw merged commit 6e63c8c into master Feb 12, 2018
@tomusdrw tomusdrw deleted the td-validation2 branch February 12, 2018 12:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants