Skip to content

Commit

Permalink
Merge pull request #280 from masterchief-Dave/feature/api-user-docs
Browse files Browse the repository at this point in the history
[Documentation]: User Endpoints
  • Loading branch information
incredible-phoenix246 authored Jul 25, 2024
2 parents 2f89f1c + 4b557de commit adba118
Show file tree
Hide file tree
Showing 9 changed files with 487 additions and 19 deletions.
9 changes: 8 additions & 1 deletion docs/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Make sure you have the following installed on your machine:
### Installation

1. Clone the repository:

```bash
git clone repo
git clone repo
cd repo
```

Expand All @@ -27,6 +28,7 @@ Make sure you have the following installed on your machine:
### Running the Server

To start the server, run:

```bash
yarn start
```
Expand All @@ -38,6 +40,7 @@ yarn start
Ensure that users are authenticated before accessing the endpoints that modify or delete resources.

#### Login

- **URL**: `/api/v1/auth/login`
- **Method**: `POST`
- **Request Body**:
Expand All @@ -52,6 +55,7 @@ Ensure that users are authenticated before accessing the endpoints that modify o
- `401 Unauthorized`: Invalid credentials

#### Register

- **URL**: `/api/v1/auth/register`
- **Method**: `POST`
- **Request Body**:
Expand Down Expand Up @@ -170,4 +174,7 @@ Ensure that users are authenticated before accessing the endpoints that modify o
## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

```
```
2 changes: 2 additions & 0 deletions src/controllers/ProductController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ export class ProductController {
* message:
* type: string
* example: "Valid product ID, name, description, price, and stock must be provided."
* 401:
* description: Unauthorized
* 500:
* description: Server error
* content:
Expand Down
Loading

0 comments on commit adba118

Please sign in to comment.