Remove Password Field from Customer Response Structure
- Eliminated the password field from the CustomerResponse struct to enhance security and prevent sensitive information exposure in API responses. - Updated the ToResponse method to reflect this change, ensuring compliance with best practices for handling user data.
This commit is contained in:
@@ -50,7 +50,6 @@ type CustomerResponse struct {
|
|||||||
FullName *string `json:"full_name"`
|
FullName *string `json:"full_name"`
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
Password string `json:"password"`
|
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Phone *string `json:"phone"`
|
Phone *string `json:"phone"`
|
||||||
@@ -68,7 +67,6 @@ func (c *Customer) ToResponse(companies []*CompanySummary) *CustomerResponse {
|
|||||||
FullName: c.FullName,
|
FullName: c.FullName,
|
||||||
Username: c.Username,
|
Username: c.Username,
|
||||||
Email: c.Email,
|
Email: c.Email,
|
||||||
Password: c.Password,
|
|
||||||
Type: string(c.Type),
|
Type: string(c.Type),
|
||||||
Status: string(c.Status),
|
Status: string(c.Status),
|
||||||
Phone: c.Phone,
|
Phone: c.Phone,
|
||||||
|
|||||||
Reference in New Issue
Block a user