wip
This commit is contained in:
@@ -44,27 +44,6 @@ const miscRouter: FastifyPluginCallback = async (fastify) => {
|
||||
url: '/geo',
|
||||
handler: controller.getGeo,
|
||||
});
|
||||
|
||||
fastify.route({
|
||||
method: 'GET',
|
||||
url: '/insights/test',
|
||||
handler: async (req, reply) => {
|
||||
const projectId = req.query.projectId as string;
|
||||
const job = await insightsQueue.add(
|
||||
'insightsProject',
|
||||
{
|
||||
type: 'insightsProject',
|
||||
payload: {
|
||||
projectId: projectId,
|
||||
date: new Date().toISOString().slice(0, 10),
|
||||
},
|
||||
},
|
||||
{ jobId: `manual:${Date.now()}:${projectId}` },
|
||||
);
|
||||
|
||||
return { jobId: job.id };
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export default miscRouter;
|
||||
|
||||
Reference in New Issue
Block a user