Skip to content

Commit

Permalink
fix: Apply auth to public upload, not private
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Nov 15, 2023
1 parent 7cce5f9 commit 8bbde4b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion api.planx.uk/modules/file/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ const router = Router();
router.post(
"/public/upload",
multer().single("file"),
useTeamEditorAuth,
validate(uploadFileSchema),
publicUploadController,
);

router.post(
"/private/upload",
multer().single("file"),
useTeamEditorAuth,
validate(uploadFileSchema),
privateUploadController,
);
Expand Down
1 change: 0 additions & 1 deletion api.planx.uk/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ app.use("/webhooks", webhookRoutes);
app.use("/analytics", analyticsRoutes);
app.use("/admin", adminRoutes);
app.use(ordnanceSurveyRoutes);
app.use(fileRoutes);
app.use("/file", fileRoutes);

app.use("/gis", router);
Expand Down

0 comments on commit 8bbde4b

Please sign in to comment.