CognxSafeTrack commited on
Commit Β·
cfa14f7
1
Parent(s): 16c048a
fix(api): remove redundant /admin prefix in admin routes to fix dashboard 404
Browse files
apps/api/src/routes/admin.ts
CHANGED
|
@@ -99,7 +99,8 @@ export async function adminRoutes(fastify: FastifyInstance) {
|
|
| 99 |
// ββ Human-in-the-Loop / Audio Overdrive ββββββββββββββββββββββββββββββββββββ
|
| 100 |
|
| 101 |
// LIVE FEED : Students blocked waiting for manual review
|
| 102 |
-
|
|
|
|
| 103 |
const pendingReviews = await prisma.userProgress.findMany({
|
| 104 |
where: {
|
| 105 |
exerciseStatus: 'PENDING_REVIEW',
|
|
@@ -139,7 +140,7 @@ export async function adminRoutes(fastify: FastifyInstance) {
|
|
| 139 |
});
|
| 140 |
|
| 141 |
// OVERRIDE ACTION : Admin posts the manual review
|
| 142 |
-
fastify.post('/
|
| 143 |
const body = OverrideFeedbackSchema.safeParse(req.body);
|
| 144 |
if (!body.success) return reply.code(400).send({ error: body.error.flatten() });
|
| 145 |
|
|
|
|
| 99 |
// ββ Human-in-the-Loop / Audio Overdrive ββββββββββββββββββββββββββββββββββββ
|
| 100 |
|
| 101 |
// LIVE FEED : Students blocked waiting for manual review
|
| 102 |
+
// LIVE FEED : Students blocked waiting for manual review
|
| 103 |
+
fastify.get('/live-feed', async () => {
|
| 104 |
const pendingReviews = await prisma.userProgress.findMany({
|
| 105 |
where: {
|
| 106 |
exerciseStatus: 'PENDING_REVIEW',
|
|
|
|
| 140 |
});
|
| 141 |
|
| 142 |
// OVERRIDE ACTION : Admin posts the manual review
|
| 143 |
+
fastify.post('/override-feedback', async (req, reply) => {
|
| 144 |
const body = OverrideFeedbackSchema.safeParse(req.body);
|
| 145 |
if (!body.success) return reply.code(400).send({ error: body.error.flatten() });
|
| 146 |
|