Skip to content

Commit 1825b16

Browse files
committed
samesite atribute added
1 parent cfadf0c commit 1825b16

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
4040

4141
# Available Endpoints
4242

43-
### User
44-
4543
| User Actions | Routes | Http Verb |
4644
| --------------- | ------------------------- | --------- |
4745
| Sign In | `/api/users/signIn` | Post |
@@ -51,8 +49,6 @@ STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
5149

5250
[Postman Documentation](https://documenter.getpostman.com/view/21643141/2s93sXcaLf#f3eb5112-676b-46c6-89a2-f5dd6b6c0927)
5351

54-
### Products
55-
5652
| Products Actions | Routes | Http Verb |
5753
| -------------------- | --------------------------------- | --------- |
5854
| Create Product | `/api/products/create` | Post |
@@ -65,8 +61,6 @@ STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
6561

6662
[Postman Documentation](https://documenter.getpostman.com/view/21643141/2s93sXcaLf#da18f92d-0285-461d-86d8-af8f93f4b079)
6763

68-
### Cart
69-
7064
| Cart Actions | Routes | Http Verb |
7165
| ------------- | -------------------- | --------- |
7266
| Create Cart | `/api/carts/create` | Post |
@@ -77,8 +71,6 @@ STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
7771

7872
[Postman Documentation](https://documenter.getpostman.com/view/21643141/2s93sXcaLf#30fad45b-31df-4ebc-a672-1a16c89c1267)
7973

80-
### Purchases
81-
8274
| Purchases Actions | Routes | Http Verb |
8375
| --------------------- | ----------------------------------- | --------- |
8476
| Create Purchase | `/api/purchases/create` | Post |
@@ -91,6 +83,22 @@ STRIPE_TOKEN=sk_text_z&&2DbCJa9d3gZkxFwJdE$&hHbRe47KHxAF%&N#qRVx*zVFG$W
9183

9284
[Postman Documentation](https://documenter.getpostman.com/view/21643141/2s93sXcaLf#31c36708-d610-4480-8c8a-628bb32dcfde)
9385

86+
| Comments Actions | Routes | Http Verb |
87+
| --------------------- | ---------------------- | --------- |
88+
| Create Purchase | `/api/comments/create` | Post |
89+
| Payment | `/api/comments/getAll` | Get |
90+
| Get Monthly Purchases | `/api/comments/delete` | Delete |
91+
92+
[Postman Documentation](https://documenter.getpostman.com/view/21643141/2s93sXcaLf#31c36708-d610-4480-8c8a-628bb32dcfde)
93+
94+
| Responses Actions | Routes | Http Verb |
95+
| --------------------- | ------------------------ | --------- |
96+
| Create Purchase | `/api/purchases/create` | Post |
97+
| Payment | `/api/purchases/payment` | Get |
98+
| Get Monthly Purchases | `/api/purchases/monthly` | Delete |
99+
100+
[Postman Documentation](https://documenter.getpostman.com/view/21643141/2s93sXcaLf#31c36708-d610-4480-8c8a-628bb32dcfde)
101+
94102
## Tests
95103

96104
```

server/Controllers/commentController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const commentController = {
1111

1212
function createComment(req, res, next) {
1313
commentService
14-
.createComment(req.user.id, req.body)
14+
.createComment(req.user.id, req.params.id, req.body)
1515
.then((comment) => res.json(comment))
1616
.catch((error) => next(error));
1717
}

server/Controllers/usersControllers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ function signIn(req, res, next) {
1616
res.cookie('token', sendToken, {
1717
httpOnly: true,
1818
secure: true,
19+
sameSite: "None",
1920
});
2021
res.json(user);
2122
} else {
@@ -46,6 +47,4 @@ function getUser(req, res, next) {
4647
.catch((error) => next(error));
4748
}
4849

49-
50-
5150
export default usersController;

0 commit comments

Comments
 (0)