M
M
marataziat2018-03-05 15:08:27
Node.js
marataziat, 2018-03-05 15:08:27

Why are changes not being saved to mongoose db?

Here is my code: https://gist.github.com/maratmkhitaryan/b81c1e50cb... and here is what is saved after a request to the database:
Request:

seal:marat-auth-api-service/ $ curl --data "username=marataziat&&password=gfar" localhost:4001/creditals                                         [18:00:05]
{"password":true,"key":"157f6d16-7ee5-4985-a7b4-c1fa78685641"}%

DB:
> db.users.find()
{ "_id" : ObjectId("5a9d103b01a1c09cc50c481b"), "firstname" : "marat", "secondname" : "mkhitaryan", "username" : "marataziat", "password" : "gfar", "sessionkey" : "@sdas", "logindate" : 20 }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2018-03-05
@RidgeA

curl sends GET by default, not POST

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question