tango-app-api-trax 3.3.1-beta-68 → 3.3.1-beta-70
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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-trax",
|
|
3
|
-
"version": "3.3.1-beta-
|
|
3
|
+
"version": "3.3.1-beta-70",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node index.js\""
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18.10.0"
|
|
@@ -3818,6 +3818,24 @@ export async function sendAlert( req, res ) {
|
|
|
3818
3818
|
}
|
|
3819
3819
|
}
|
|
3820
3820
|
|
|
3821
|
+
export async function getUserEmails( req, res ) {
|
|
3822
|
+
try {
|
|
3823
|
+
let requestData = req.body;
|
|
3824
|
+
// Get User Based Checklist //
|
|
3825
|
+
let loginUser = { clientId: requestData.clientId, role: req.user.role, userType: req.user.userType, userEmail: req.user.email };
|
|
3826
|
+
let getUserEmails = await getChecklistUsers( loginUser );
|
|
3827
|
+
// End: Get User Based Checklist////
|
|
3828
|
+
if ( !getUserEmails.length ) {
|
|
3829
|
+
return res.sendError( { error: 'No Users Found' }, 204 );
|
|
3830
|
+
} else {
|
|
3831
|
+
return res.sendSuccess( { userEmailData: getUserEmails } );
|
|
3832
|
+
}
|
|
3833
|
+
} catch ( e ) {
|
|
3834
|
+
logger.error( { function: 'getUserEmails', error: e, message: req.body } );
|
|
3835
|
+
return res.sendError( e, 500 );
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3821
3839
|
// async function getChecklistUsers( loginUser ) {
|
|
3822
3840
|
// try {
|
|
3823
3841
|
// // userType, role, clientId, userEmail All Key Required Fields
|