Skip to content

Commit

Permalink
Merge pull request #214 from learnsoftwaredevelopment/resolved-bug-in…
Browse files Browse the repository at this point in the history
…-post-software-api

Resolved a bug in `POST` `software` API endpoint where the `software` model `meta` properties are not updated
  • Loading branch information
JonathanLeeWH authored Aug 1, 2021
2 parents 6f71655 + 086f0d4 commit 1e47f48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions controllers/api/softwareController.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const postSoftware = async (req, res) => {
const softwareObject = {
...body,
meta: {
...body.meta,
addedByUser: userId,
updatedByUser: userId,
},
Expand Down
2 changes: 1 addition & 1 deletion requests/api/softwares/patch_softwareById.rest
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PUT http://localhost:3001/api/software/5f997876dde20a5a60ce1c64
PATCH http://localhost:3001/api/software/5f997876dde20a5a60ce1c64
Content-Type: application/json
Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InNhbXBsZSIsImlkIjoiNWY4ZGEzODcwODlmZmY0ZGIwNmJjMGFmIiwiaWF0IjoxNjAzODkzMzExfQ.ARy4EKDMzJqd4DcZyWXP5hygSQ9A2Bw1YfMQ-Nb03JU

Expand Down

0 comments on commit 1e47f48

Please sign in to comment.