MCPcopy Create free account
hub / github.com/developit/express-es6-rest-api / update

Function update

server/api/facets.js:36–43  ·  view source on GitHub ↗

PUT /:id - Update a given entity

({ facet, body }, res)

Source from the content-addressed store, hash-verified

34
35 /** PUT /:id - Update a given entity */
36 update({ facet, body }, res) {
37 for (let key in body) {
38 if (key!=='id') {
39 facet[key] = body[key];
40 }
41 }
42 res.sendStatus(204);
43 },
44
45 /** DELETE /:id - Delete a given entity */
46 delete({ facet }, res) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected