13 lines
330 B
JavaScript
13 lines
330 B
JavaScript
|
console.log("router/share INIT");
|
||
|
var express = require("express");
|
||
|
var router = new express.Router();
|
||
|
const database = require("../services/database");
|
||
|
|
||
|
router.route("/:id").get((req, res) => {
|
||
|
database.share.byId(req.params.id, (result) => {
|
||
|
res.json(result).status(200).end();
|
||
|
});
|
||
|
});
|
||
|
|
||
|
module.exports = router;
|