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

Fixed Response header error #8

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

Commits on Jul 25, 2024

  1. fixed ERR_HTTP_HEADERS_SENT error

    the res.status(200).json({ ...post, isSaved: saved ? true : false }); line is inside the jwt.verify callback. If there's an error during the JWT verification, or if the token is not present, the response is not being sent, which might lead to the client waiting indefinitely for a response.
    krizto8 authored Jul 25, 2024
    Configuration menu
    Copy the full SHA
    e6d029a View commit details
    Browse the repository at this point in the history
  2. Update post.controller.js

    krizto8 authored Jul 25, 2024
    Configuration menu
    Copy the full SHA
    f1eae32 View commit details
    Browse the repository at this point in the history
  3. Update post.controller.js

    Fixed the ERR_HTTP_HEADERS_SENT error due by removing the additional res.status at line 63 which was setting the header regardless of the JWT verification.
    krizto8 authored Jul 25, 2024
    Configuration menu
    Copy the full SHA
    deb40a7 View commit details
    Browse the repository at this point in the history