Commit 8df1aa13 authored by Panagiotis Skarvelis's avatar Panagiotis Skarvelis
Browse files

ause latest auditrecord db

parent c8fd620d
......@@ -31,13 +31,13 @@ const getIdentity = (afm, user, pass, overides) => __awaiter(void 0, void 0, voi
const auditStoragePath = (_c = overides === null || overides === void 0 ? void 0 : overides.auditStoragePath) !== null && _c !== void 0 ? _c : "/tmp";
const auditEngine = (_d = overides === null || overides === void 0 ? void 0 : overides.auditEngine) !== null && _d !== void 0 ? _d : new gsis_audit_record_db_1.FileEngine(auditStoragePath);
const wsdl = prod == true ? config_json_1.default.prod.wsdl : config_json_1.default.test.wsdl;
const auditRecord = (0, gsis_audit_record_db_1.generateAuditRecord)(auditInit, auditEngine);
const auditRecord = yield (0, gsis_audit_record_db_1.generateAuditRecord)(auditInit, auditEngine);
if (!auditRecord)
throw new Error('Audit record is not initialized');
try {
const s = new soapClient_js_1.default(wsdl, user, pass, auditRecord);
const Identity = yield s.getIdentity(afm);
return Identity;
return Object.assign(Object.assign({}, Identity), auditRecord);
}
catch (error) {
throw (error);
......
......@@ -15,13 +15,13 @@ export const getIdentity = async (afm, user, pass, overides) => {
const auditStoragePath = overides?.auditStoragePath ?? "/tmp";
const auditEngine = overides?.auditEngine ?? new FileEngine(auditStoragePath);
const wsdl = prod == true ? config.prod.wsdl : config.test.wsdl;
const auditRecord = generateAuditRecord(auditInit, auditEngine);
const auditRecord = await generateAuditRecord(auditInit, auditEngine);
if (!auditRecord)
throw new Error('Audit record is not initialized');
try {
const s = new soapClient(wsdl, user, pass, auditRecord);
const Identity = await s.getIdentity(afm);
return Identity;
return { ...Identity, ...auditRecord };
}
catch (error) {
throw (error);
......
{
"name": "@digigov-oss/get-nnc-identity-client",
"version": "1.0.9",
"version": "1.1.0",
"type": "module",
"description": "Client for getNncIdentity service of GSIS",
"engines": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment