tango-app-api-trax 3.8.1 → 3.8.3
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
|
@@ -34,6 +34,7 @@ import { getBrowser as getBrowserInstance } from '../utils/browserPool.utils.js'
|
|
|
34
34
|
import fs from 'fs';
|
|
35
35
|
import path from 'path';
|
|
36
36
|
import { fileURLToPath as toPath } from 'url';
|
|
37
|
+
import * as cameraService from '../services/camera.service.js';
|
|
37
38
|
|
|
38
39
|
const __ctrlDir = path.dirname( toPath( import.meta.url ) );
|
|
39
40
|
const tangoyeLogoSvg = fs.readFileSync(
|
|
@@ -4193,3 +4194,17 @@ export async function aiChecklistDetails( req, res ) {
|
|
|
4193
4194
|
return res.sendError( e, 500 );
|
|
4194
4195
|
}
|
|
4195
4196
|
}
|
|
4197
|
+
|
|
4198
|
+
export async function getEyetestStream( req, res ) {
|
|
4199
|
+
try {
|
|
4200
|
+
if ( !req.body.storeId ) {
|
|
4201
|
+
return res.sendError( 'storeId is required', 400 );
|
|
4202
|
+
}
|
|
4203
|
+
let eyeTestStreamDetails = await cameraService.find( { storeId: req.body.storeId, isEyeTestStream: true }, { streamName: 1 } );
|
|
4204
|
+
|
|
4205
|
+
return res.sendSuccess( eyeTestStreamDetails?.map( ( ele ) => ele?.streamName ) );
|
|
4206
|
+
} catch ( e ) {
|
|
4207
|
+
logger.error( { functionName: 'getEyetestStream', error: e } );
|
|
4208
|
+
return res.sendError( e, 500 );
|
|
4209
|
+
}
|
|
4210
|
+
}
|
|
@@ -41,7 +41,8 @@ internalTraxRouter
|
|
|
41
41
|
.get( '/checklistAutoMailList', isAllowedInternalAPIHandler, internalController.checklistAutoMailList )
|
|
42
42
|
.post( '/sendAIEmailList', isAllowedInternalAPIHandler, internalController.sendAIEmailList )
|
|
43
43
|
.post( '/liveAiPushNotificationAlert', isAllowedInternalAPIHandler, internalController.liveAiPushNotificationAlert )
|
|
44
|
-
.
|
|
44
|
+
.get( '/aiChecklistDetails', isAllowedInternalAPIHandler, internalController.aiChecklistDetails )
|
|
45
|
+
.get( '/getEyetestStream', isAllowedInternalAPIHandler, internalController.getEyetestStream )
|
|
45
46
|
;
|
|
46
47
|
|
|
47
48
|
|