Fix jwt-token
This commit is contained in:
@@ -27,10 +27,13 @@ router.get('/debug-test', (req, res) => {
|
||||
});
|
||||
|
||||
// Get recent detection payloads with raw data
|
||||
router.get('/detection-payloads', authenticateToken, multiAuth.middleware(), async (req, res) => {
|
||||
router.get('/detection-payloads', authenticateToken, async (req, res) => {
|
||||
try {
|
||||
const { limit = 50, offset = 0, device_id, detection_id } = req.query;
|
||||
|
||||
// Get tenant context for multi-tenant isolation
|
||||
const tenantId = await multiAuth.determineTenant(req);
|
||||
|
||||
const whereClause = {
|
||||
raw_payload: { [Op.ne]: null }
|
||||
};
|
||||
@@ -83,10 +86,13 @@ router.get('/detection-payloads', authenticateToken, multiAuth.middleware(), asy
|
||||
});
|
||||
|
||||
// Get recent heartbeat payloads with raw data
|
||||
router.get('/heartbeat-payloads', authenticateToken, multiAuth.middleware(), async (req, res) => {
|
||||
router.get('/heartbeat-payloads', authenticateToken, async (req, res) => {
|
||||
try {
|
||||
const { limit = 50, offset = 0, device_id } = req.query;
|
||||
|
||||
// Get tenant context for multi-tenant isolation
|
||||
const tenantId = await multiAuth.determineTenant(req);
|
||||
|
||||
const whereClause = {
|
||||
raw_payload: { [Op.ne]: null }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user