Skip to content

Commit

Permalink
fix: /status and root routes should be GET methods
Browse files Browse the repository at this point in the history
  • Loading branch information
williams-jack committed Aug 28, 2024
1 parent c7f1a4d commit 0f43948
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orchestrator/packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ app.use(cors());
app.use(express.json());

app.use("/api/v1", gradingQueueRouter, dockerImagesRouter, holdingPenRouter, validationsRouter);
app.use("/status", async (_req, res) => res.json({"message": "ok", "numJobs": await getNumJobsEnqueued()}));
app.get("/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>'));
app.get("/", async(_req, res) => res.send('<h1>Orca Web API</h1>'));

app.listen(CONFIG.api.port, () => {
if (!existsSync(CONFIG.dockerImageFolder)) {
Expand Down

0 comments on commit 0f43948

Please sign in to comment.