Add Hash fields to recipients response
This commit is contained in:
parent
7cc1444eac
commit
a5c5872065
3 changed files with 26 additions and 4 deletions
20
package-lock.json
generated
20
package-lock.json
generated
|
@ -313,6 +313,11 @@
|
|||
"is-regex": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"charenc": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
|
||||
},
|
||||
"clean-css": {
|
||||
"version": "4.1.11",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz",
|
||||
|
@ -444,6 +449,11 @@
|
|||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"crypt": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
||||
"integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs="
|
||||
},
|
||||
"currently-unhandled": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
|
||||
|
@ -1224,6 +1234,16 @@
|
|||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
|
||||
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0="
|
||||
},
|
||||
"md5": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
|
||||
"integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=",
|
||||
"requires": {
|
||||
"charenc": "~0.0.1",
|
||||
"crypt": "~0.0.1",
|
||||
"is-buffer": "~1.1.1"
|
||||
}
|
||||
},
|
||||
"media-typer": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
"debug": "^4.1.1",
|
||||
"express": "~4.16.4",
|
||||
"express-subdomain": "^1.0.5",
|
||||
"md5": "^2.2.1",
|
||||
"morgan": "~1.9.1",
|
||||
"node-sass-middleware": "^0.11.0",
|
||||
"pug": "^2.0.3",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const express = require('express');
|
||||
const router = express.Router();
|
||||
const protocol = require('../utils/connection');
|
||||
const md5 = require('md5');
|
||||
|
||||
router.get("/", (req, res) => {
|
||||
const base = protocol(req) + "://" + req.get('host') + "/Default";
|
||||
|
@ -99,13 +100,13 @@ router.get("/Adresaci.mvc/GetAdresaci", (req, res) => {
|
|||
"success": true,
|
||||
"data": require("../../data/api/dictionaries/Pracownicy").map(item => {
|
||||
return {
|
||||
"Id": item.Id + "rPracownik",
|
||||
"Nazwa": item.Imie + " " + item.Nazwisko + " [" + item.Kod + "] - pracownik (" + user.JednostkaSprawozdawczaSkrot + ")",
|
||||
"Id": `${item.Id}rPracownik`,
|
||||
"Nazwa": `${item.Imie} ${item.Nazwisko} [${item.Kod}] - pracownik (${user.JednostkaSprawozdawczaSkrot})`,
|
||||
"IdLogin": item.Id,
|
||||
"IdJednostkaSprawozdawcza": user.IdJednostkaSprawozdawcza,
|
||||
"RolaEnum": null,
|
||||
"Rola": 2,
|
||||
"PushWiadomosc": null
|
||||
"PushWiadomosc": null,
|
||||
"Hash": Buffer.from(md5(item.Id)).toString('base64')
|
||||
};
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue