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

Function create

server/api/facets.js:24–28  ·  view source on GitHub ↗

POST / - Create a new entity

({ body }, res)

Source from the content-addressed store, hash-verified

22
23 /** POST / - Create a new entity */
24 create({ body }, res) {
25 body.id = facets.length.toString(36);
26 facets.push(body);
27 res.json(body);
28 },
29
30 /** GET /:id - Return a given entity */
31 read({ params }, res) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected