add route get alias and person

This commit is contained in:
2023-06-07 07:32:23 +02:00
parent 41dbd92e4a
commit fd712a6d73
6 changed files with 77 additions and 38 deletions

View File

@@ -47,6 +47,15 @@ Delete idem
Owner means it can be Write/Delete if field OWNER contain the UUID that try to act on this object. Usefull to allow someone to fully manage its objects.
*/
router.get("/alias/:alias", (req, res) => {
res.send(Pagans.getalias(req.params.alias));
});
router.get("/person/:alias", (req, res) => {
// check accessright for req.session.header.xalias to see if jhe can get person data
// if req.param.alias == req.session.header.xalias => Owner
// else need accessright to on person set at R
res.send(Pagans.getperson(req.params.alias, req.session.header.xtribe));
});
router.get("/isauth", checkHeaders, isAuthenticated, (req, res) => {
/**