expand orders #75
Reference in New Issue
Block a user
Delete Branch "expand_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?
@@ -106,3 +115,3 @@Table("b2b_customer_orders").Where("order_id = ?", order_id).Update("status", status).Updates(map[string]interface{}{this code is fine but just letting you know that when you use DB.Model() instead of DB.Table the updated_at columns is being updated by gorm automatically
@@ -130,6 +130,7 @@ func (s *AuthService) Login(req *model.LoginRequest) (*model.AuthResponse, strinuser.LangID = *req.LangID}user.Country = nildb shouldn't be called in the service and updating logic should be in single place in repo. that way we don't have to rely on remembering to nullify associated models like country.
Best approach would be to build a Customer model out of a DTO for this operation for the sake of safety.
But the customer struct is small enough that nullifying Country and Role would be sufficient for now.
yeah, it's old code, and it's coauthored by me and Marek. Let's leave things as they are (and hopefully not change Customer struct anymore)