Skip to content

Commit

Permalink
fix: add validations router to api entry
Browse files Browse the repository at this point in the history
  • Loading branch information
williams-jack committed Aug 28, 2024
1 parent 6ed0ac1 commit c7f1a4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion orchestrator/packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import cors = require("cors");
import dockerImagesRouter from "./routes/docker-images";
import holdingPenRouter from "./routes/holding-pen";
import { getNumJobsEnqueued } from "@codegrade-orca/db";
import validationsRouter from "./routes/validations";

const CONFIG = getConfig();

const app: Express = express();
app.use(cors());
app.use(express.json());

app.use("/api/v1", gradingQueueRouter, dockerImagesRouter, holdingPenRouter);
app.use("/api/v1", gradingQueueRouter, dockerImagesRouter, holdingPenRouter, validationsRouter);
app.use("/status", async (_req, res) => res.json({"message": "ok", "numJobs": await getNumJobsEnqueued()}));
app.use("/images", express.static(CONFIG.dockerImageFolder));
app.use("/", async(_req, res) => res.send('<h1>Orca Web API</h1>'));
Expand Down

0 comments on commit c7f1a4d

Please sign in to comment.