orders #58
Reference in New Issue
Block a user
Delete Branch "orders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Basic orders mechanics.
Please check if the permissions look good.
@@ -0,0 +87,4 @@if err != nil {return err}after successful order placement we should either delete or deactivate the cart that is leftover
@@ -0,0 +89,4 @@}// send email to adminerr = s.emailService.SendNewOrderPlacedNotification(user_id)should be a goroutine to not stall the user from getting response from the server
@@ -0,0 +119,4 @@}func (s *OrderService) ChangeOrderStatus(user *model.Customer, order_id uint, status string) error {if !user.HasPermission(perms.ModifyAllOrders) {standard user never changes it's own order status, only admin has privilege to do that. endpoint should forbid access at the handler level
this PR is still waiting for review...