Skip to content

Incorrect HTTP Method Used for Updating Chapter Number #67

Description

@beetle-ai

ISSUE_NUMBER: GH-4

Description

The /update/chapternumber route in routes/chapterRoutes.js uses the POST method, which is not semantically correct for updating a resource. It should use PUT or PATCH instead.
File: repositories/QuestionBankapi/routes/chapterRoutes.js
Line: 23
Severity: medium

Current Behavior

The route uses POST to update the chapter number.

Expected Behavior

The route should use PUT or PATCH to update the chapter number.

Suggested Fix

Change the HTTP method from POST to PUT or PATCH.

Code Context

router.post("/update/chapternumber", chapterNumberUpdate)

Additional Notes

Using the correct HTTP method improves the API's clarity and adherence to RESTful principles.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions