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

[Workers] Postmark example issues #14467

Closed
KianNH opened this issue May 8, 2024 · 4 comments · Fixed by #14493
Closed

[Workers] Postmark example issues #14467

KianNH opened this issue May 8, 2024 · 4 comments · Fixed by #14493
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product

Comments

@KianNH
Copy link
Contributor

KianNH commented May 8, 2024

Existing documentation URL(s)

What changes are you suggesting?

  • Formatting

    • There is a newline at the start of the fetch handlers, it'd be good if we could run the examples through Prettier.
  • Code issues

    • Whilst it is functional, return Response.json(await response.json()) is redundant. It is parsing a JSON string into a JS object, and then stringifying that JS object back into a JSON string. It would be sufficient to just return response.
  • Possible additions

    • It'd be cool to have an example of taking user input (query params, JSON body, etc) and including that in the emails, so users can have a Worker as an "email sending" API.

Additional information

No response

@KianNH KianNH added content:edit Request for content edits documentation Documentation edits labels May 8, 2024
@github-actions github-actions bot added the product:workers Related to Workers product label May 8, 2024
@kodster28
Copy link
Contributor

@megaconfidence, mind taking a look at this one?

@megaconfidence
Copy link
Member

Hi @KianNH, I'll update the response line as you've suggested. The new line before and after the fetch block helps with readability. Thanks for your feedback.

@Cherry
Copy link
Contributor

Cherry commented May 9, 2024

Hi @KianNH, I'll update the response line as you've suggested. The new line before and after the fetch block helps with readability. Thanks for your feedback.

Out of interest, what makes you think that helps with readability?

It's not a standard across any other workers tutorials, or workers templates with C3, etc. I would argue that consistent code style is more important in the docs than personal preferences.

@megaconfidence
Copy link
Member

Hi @Cherry, this fixed in #14583

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:workers Related to Workers product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants