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

Tests for server.#7

Merged
tomusdrw merged 2 commits into
masterfrom
td-server-tests
Feb 8, 2018
Merged

Tests for server.#7
tomusdrw merged 2 commits into
masterfrom
td-server-tests

Conversation

@tomusdrw
Copy link
Copy Markdown
Contributor

@tomusdrw tomusdrw commented Feb 8, 2018

No description provided.

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.

Looks about right.

Comment thread server.js
app.post('/push-release/:tag/:commit', handleAsync(async function (req, res) {
if (keccak256(req.body.secret || '') !== secretHash) {
throw new Error('Bad request');
throw new Error('Invalid secret');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can this bit be a middleware if it's used several times?

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.

Had the same idea, realized in #8

@tomusdrw tomusdrw merged commit 1adc816 into master Feb 8, 2018
@tomusdrw tomusdrw deleted the td-server-tests branch February 8, 2018 21:40
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