Skip to content

Commit

Permalink
feat: project submission endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrastopoulos committed Feb 6, 2025
1 parent 85f88c1 commit 4a9148c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/routes/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
enterProject,
getAllProjects,
getProjectByID,
submitProject,
updateProjectTableNumber,
} from "../controllers/ProjectsController";
import { asyncCatch } from "../util/asyncCatch";
Expand Down Expand Up @@ -265,4 +266,32 @@ router.patch(
asyncCatch(updateProjectTableNumber)
);

/**
* @swagger
* /projects/{id}/submit:
* post:
* summary: Submit a project
* security:
* - apiKeyAuth: []
* tags: [Projects Module]
* description: Submit a project. Access - User(Own)/Admin.
* parameters:
* - in: path
* name: id
* schema:
* type: string
* required: true
* description: Project ID
* responses:
* 200:
* description: Success.
* 400:
* description: Bad request
* 403:
* description: Unauthorized.
* 500:
* description: Internal Server Error.
*/
router.post("/:id/submit", isProjectOwnerOrAdmin, asyncCatch(submitProject));

export default router;

0 comments on commit 4a9148c

Please sign in to comment.