Skip to content

Code execution continues when it should stop in POST action #407

@belmirp

Description

@belmirp

Hello.
If you try to post empty data via API, not React client application, the application will crash. The particular line in problem is in post.controller.js file, where you check if name, title or content are empty. The line:

res.status(403).end();

should abort execution. Possible solution could be:

return res.status(403).end();

but it raises eslint consistent-return warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions