adding stuff
All checks were successful
Recommender Build and Deploy (internal) / Build Recommender Image (push) Successful in 4m6s
Recommender Build and Deploy (internal) / Deploy Recommender (internal) (push) Successful in 12s

This commit is contained in:
2026-03-31 17:21:50 -03:00
parent be2d8d70cb
commit bb8a5da45e
10 changed files with 106 additions and 9 deletions

View File

@@ -116,6 +116,21 @@ export default async function recommendationsRoute(fastify: FastifyInstance) {
}
});
// DELETE /recommendations/:id — delete a recommendation
fastify.delete('/recommendations/:id', async (request, reply) => {
const { id } = request.params as { id: string };
const [rec] = await db
.select({ id: recommendations.id })
.from(recommendations)
.where(eq(recommendations.id, id));
if (!rec) return reply.code(404).send({ error: 'Not found' });
await db.delete(recommendations).where(eq(recommendations.id, id));
return reply.send({ ok: true });
});
// POST /recommendations/:id/rerank — reset status so client can re-open SSE stream
fastify.post('/recommendations/:id/rerank', async (request, reply) => {
const { id } = request.params as { id: string };