Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Comment:Step-Basic-Rest-api-server #685

Closed
kadams54 opened this issue Jun 15, 2017 · 1 comment
Closed

Comment:Step-Basic-Rest-api-server #685

kadams54 opened this issue Jun 15, 2017 · 1 comment
Assignees

Comments

@kadams54
Copy link
Contributor

Data seems to be accumulated, resulting in duplicate users being inserted when running through each example.

To replicate (this mimics someone reading through the guides):

  1. node ./examples/step/01/db-connector/1.js
  2. node ./examples/step/01/rest/1.js
  3. ./examples/step/01/rest/curl-requests.sh (in another terminal session)

According to the docs, the output for 'GET all users' ought to be an array of three users. Instead, I see an array of six users; those created in step 1 above and those created in step 2:

POST Jane Doe
{"email":"jane.doe@gmail.com","password":"X2y6","role":"admin","_id":"ebdc0nLciJilDNtI"}
POST John Doe
{"email":"john.doe@gmail.com","password":"i6He","role":"user","_id":"jfRNVuRimf4aFQPN"}
POST Judy Doe
{"email":"judy.doe@gmail.com","password":"7jHw","role":"user","_id":"ZqbMkz4TxuuJMvaj"}
GET all users
[{"email":"john.doe@gmail.com","password":"22222","role":"user","_id":"H4KFEqbimsD96M1s"},
{"email":"jane.doe@gmail.com","password":"11111","role":"admin","_id":"KI3diKxoImzchiO2"},
{"email":"judy.doe@gmail.com","password":"33333","role":"user","_id":"T9dE0xGlHtovFDhv"},
{"email":"judy.doe@gmail.com","password":"7jHw","role":"user","_id":"ZqbMkz4TxuuJMvaj"},
{"email":"jane.doe@gmail.com","password":"X2y6","role":"admin","_id":"ebdc0nLciJilDNtI"},
{"email":"john.doe@gmail.com","password":"i6He","role":"user","_id":"jfRNVuRimf4aFQPN"}]
@eddyystop
Copy link
Contributor

Thanks. You can delete the files in data/ by hand between examples.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants