Skip to content

Commit

Permalink
updated and addressed peer review comments on tutorials API
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshitaShroff committed May 16, 2024
1 parent 3a3f0e0 commit 955a300
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content/docs/backend/API/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ DELETE /api/tutorials/{id}
true
```
-----------------------------------------------------------------------------
### PUT: Create a tutorial
### PUT: Update a tutorial
PUT /api/tutorials/{id}

- URL: `/api/tutorials/{id}`
Expand Down Expand Up @@ -110,13 +110,13 @@ POST /api/tutorials


- Response:
`201 Created`
`201 Created`: Tutorial added successfully.

- Example Request:
```bash
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: 3DLo9xQoiKbXb7-ViNzJ' -d 'tutorial%5Bunit_id%5D=1&tutorial%5Btutor_id%5D=43&tutorial%5Bcapacity%5D=45&tutorial%5Babbreviation%5D=tut_test2&tutorial%5Bmeeting_location%5D=online&tutorial%5Bmeeting_day%5D=Tue&tutorial%5Bmeeting_time%5D=11%3A00' 'http://localhost:3000/api/tutorials'
```
- Response body:
```
null
Tutorial added successfully.
```

0 comments on commit 955a300

Please sign in to comment.