CognxSafeTrack commited on
Commit
cfa14f7
Β·
1 Parent(s): 16c048a

fix(api): remove redundant /admin prefix in admin routes to fix dashboard 404

Browse files
Files changed (1) hide show
  1. apps/api/src/routes/admin.ts +3 -2
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
- fastify.get('/admin/live-feed', async () => {
 
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('/admin/override-feedback', async (req, reply) => {
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