Active: Boolean

Open Beginner friendly
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start in the usersController file mentioned in the issue and compare the user object with the working sample. Reproduce the POST-user validation error, then verify that the request succeeds without the required active-field error and that duplicate validation still works.

Written by the indexing model from the issue text.

Description

The code block below that is inside the file usersController is missing the active parameter.

I added a sample code below it to be compared to the original code, if you have the time, thanks.
I realized that when I used the first code blocked below this line, I got back the following error after trying to POST a user. ("message": "User validation failed: active: Path active is required.")

But after trying the second code block everything went smoothly including the duplicate validation.
This is my first time of raising an issue, please pardon my crudeness.

const userObject = { username, password: hashedPwd, roles};
const userObject = { username, password: hashedPwd, roles, active: true };
Dominant language
JavaScript
Stars
610
Forks
398
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from gitdagray/mern_stack_course

All issues in gitdagray/mern_stack_course

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.