2025-12-11 10:40:55 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2025 by Christian Kellner.
|
|
|
|
|
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
|
|
|
|
|
*/
|
|
|
|
|
|
2023-03-13 13:42:43 +01:00
|
|
|
import restana from 'restana';
|
|
|
|
|
import * as listingStorage from '../../services/storage/listingsStorage.js';
|
|
|
|
|
const service = restana();
|
2021-01-21 16:09:23 +01:00
|
|
|
const analyticsRouter = service.newRouter();
|
|
|
|
|
analyticsRouter.get('/:jobId', async (req, res) => {
|
|
|
|
|
const { jobId } = req.params;
|
|
|
|
|
res.body = listingStorage.getListingProviderDataForAnalytics(jobId) || {};
|
|
|
|
|
res.send();
|
|
|
|
|
});
|
2023-03-13 13:42:43 +01:00
|
|
|
export { analyticsRouter };
|