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

Clarify example for Fastify #311

Merged
merged 1 commit into from
Oct 10, 2022
Merged

Clarify example for Fastify #311

merged 1 commit into from
Oct 10, 2022

Conversation

piranna
Copy link
Contributor

@piranna piranna commented Oct 9, 2022

Some linters (or personal preference) remove async from functions if there are no await or return a Promise object. This, with some bad errors management in Fastify, has lead me to two full week of head banging. With the sync signature, it gets more explicit that the body parsing always succeed by doing nothing.

Note: null is needed due to how Typescript types are defined, for regular Javascript just calling done() should works.

Some linters (or personal preference) remove `async` from functions if there are no `await` or return a `Promise` object. This, with some bad errors management in Fastify, has lead me to two full week of head banging. With the sync signature, it gets more explicit that the body parsing always succeed by doing nothing.

Note: `null` is needed due to how Typescript types are defined, for regular Javascript just calling `done()` should works.
Copy link
Member

@Murderlon Murderlon left a comment

Choose a reason for hiding this comment

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

Thank you!

@Murderlon Murderlon merged commit d89ed78 into tus:master Oct 10, 2022
@piranna piranna deleted the patch-1 branch October 10, 2022 18:24
@piranna
Copy link
Contributor Author

piranna commented Oct 10, 2022

You are welcome :-)

Murderlon added a commit that referenced this pull request Nov 18, 2022
* master:
  0.9.0
  Allow `credentials` instead of key/secret for the S3 store (#282)
  Clarify example for Fastify (#311)
Murderlon added a commit that referenced this pull request Nov 18, 2022
* 1.x:
  0.9.0
  Allow `credentials` instead of key/secret for the S3 store (#282)
  Update engines.node version requirement
  Add the `Expiration` extension, implement it in `FileStore` (#320)
  Lock CI Node.js version to 19.0.1
  Clarify example for Fastify (#311)
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