Skip to content

Update Profile

Petar Scepanovic edited this page Jan 7, 2020 · 4 revisions

For updating profile/account, send PATCH request at http://localhost:9000/updateProfile/:id

Tested in Postman Important note: token is required is Authorization header

Example of request where we change the password of the user:

{	
"password": "password100"	
}

Response:

{
    "confirmed": true,
    "_id": "5e133660d1aead3964982fd0",
    "email": "[email protected]",
    "password": "$2a$10$aW9ktkuvYM4ZfZXKWisQsurV6TUyYKkZQKCBz8JpYHmygqEo.Slj.",
    "type": "buyer",
    "createdAt": "2020-01-06T13:30:08.725Z",
    "updatedAt": "2020-01-07T12:07:22.461Z",
    "__v": 0,
    "profile_picture": "http://res.cloudinary.com/petar/image/upload/v1578319391/art-finder/dpiy9x8mishxh6limpng.jpg",
    "reset_password_expires": 1578402055883,
    "reset_password_token": "",
    "firstname": "Petar",
    "lastname": "Scepanovic",
    "userId": "5e133660d1aead3964982fcf"
}
Clone this wiki locally