orders #58

Merged
goc_daniel merged 13 commits from orders into main 2026-04-14 11:20:06 +00:00
Owner

Basic orders mechanics.

Please check if the permissions look good.

Basic orders mechanics. Please check if the permissions look good.
goc_daniel added 9 commits 2026-04-10 12:58:07 +00:00
goc_daniel added 1 commit 2026-04-10 13:17:33 +00:00
goc_daniel requested review from dudzic_wiktor 2026-04-10 13:17:53 +00:00
dudzic_wiktor reviewed 2026-04-10 13:45:43 +00:00
@@ -0,0 +87,4 @@
if err != nil {
return err
}
Collaborator

after successful order placement we should either delete or deactivate the cart that is leftover

after successful order placement we should either delete or deactivate the cart that is leftover
goc_daniel marked this conversation as resolved
@@ -0,0 +89,4 @@
}
// send email to admin
err = s.emailService.SendNewOrderPlacedNotification(user_id)
Collaborator

should be a goroutine to not stall the user from getting response from the server

should be a goroutine to not stall the user from getting response from the server
goc_daniel marked this conversation as resolved
@@ -0,0 +119,4 @@
}
func (s *OrderService) ChangeOrderStatus(user *model.Customer, order_id uint, status string) error {
if !user.HasPermission(perms.ModifyAllOrders) {
Collaborator

standard user never changes it's own order status, only admin has privilege to do that. endpoint should forbid access at the handler level

standard user never changes it's own order status, only admin has privilege to do that. endpoint should forbid access at the handler level
goc_daniel marked this conversation as resolved
goc_daniel added 1 commit 2026-04-13 07:21:36 +00:00
Author
Owner

this PR is still waiting for review...

this PR is still waiting for review...
dudzic_wiktor approved these changes 2026-04-14 06:28:53 +00:00
goc_daniel added 2 commits 2026-04-14 11:19:53 +00:00
goc_daniel merged commit 5e1a8e898c into main 2026-04-14 11:20:06 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: goc_daniel/b2b#58