Fix jwt-token

This commit is contained in:
2025-09-18 06:09:01 +02:00
parent 66ee40be00
commit 93723d4b96

View File

@@ -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 }
};