tango-app-api-report 3.4.0-beta.0 → 3.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -129,24 +129,21 @@ export async function deleteReport( req, res ) {
|
|
|
129
129
|
const previousReport = await reportGetSingle( {
|
|
130
130
|
_id: inputData?.id,
|
|
131
131
|
} );
|
|
132
|
+
const client = previousReport?.clientId;
|
|
133
|
+
const changes =[ `The Report ${previousReport?.fileName}.${previousReport?.fileType} has been` ];
|
|
134
|
+
|
|
135
|
+
await deleteOneReport( { _id: inputData?.id } );
|
|
132
136
|
|
|
133
|
-
await deleteOneReport( { _id: inputData.id } );
|
|
134
|
-
const postReport = await reportGetSingle( {
|
|
135
|
-
_id: req.params?.id,
|
|
136
|
-
} );
|
|
137
137
|
const logObj = {
|
|
138
|
-
clientId:
|
|
138
|
+
clientId: client,
|
|
139
139
|
userName: req?.user?.userName,
|
|
140
140
|
email: req?.user?.email,
|
|
141
141
|
date: new Date(),
|
|
142
142
|
logType: 'configuration',
|
|
143
143
|
logSubType: 'reportConfig',
|
|
144
|
-
changes:
|
|
144
|
+
changes: changes,
|
|
145
145
|
eventType: 'delete',
|
|
146
146
|
showTo: [ 'tango' ],
|
|
147
|
-
current: postReport,
|
|
148
|
-
previous: previousReport,
|
|
149
|
-
|
|
150
147
|
};
|
|
151
148
|
|
|
152
149
|
|