Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelim01 committed Oct 1, 2024
1 parent fe2d3db commit 404f3ff
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions services/question/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,28 +425,28 @@ curl -X DELETE http://localhost:8081/questions/21

## Delete Questions

This endpoint allows the deletion of multiple questions by the question ID.
This endpoint allows the deletion of multiple questions by their question IDs.

- **HTTP Method**: `POST`
- **Endpoint**: `/questions/delete`

### Parameters:

- `ids` (Required) - The IDs of the questions to delete.
- `ids` (Required) - An array of integers representing the IDs of the questions to delete, e.g. `[1, 2, 3]`.

### Responses:

| Response Code | Explanation |
|-----------------------------|------------------------------------------------|
| 200 (OK) | Success, the question is deleted successfully. |
| 400 (Bad Request) | The `id` was not specified |
| 404 (Not Found) | A question with the specified id not found. |
| 500 (Internal Server Error) | Unexpected error in the database or server. |
| Response Code | Explanation |
|-----------------------------|------------------------------------------------------|
| 200 (OK) | Success, the question is deleted successfully. |
| 400 (Bad Request) | The `ids` parameter was not specified or is invalid. |
| 404 (Not Found) | A question with the specified id not found. |
| 500 (Internal Server Error) | Unexpected error in the database or server. |

### Command Line Example:

```
curl -X POST http://localhost:8081/questions/delete -H "Content-Type: application/json" -d '{"ids": [21]}'
curl -X POST http://localhost:8081/questions/delete -H "Content-Type: application/json" -d '{"ids": [21, 22]}'
```

### Example of Response Body for Success:
Expand Down

0 comments on commit 404f3ff

Please sign in to comment.