From 3af09693f8a3048ba0f0002a48cb9eaf71aac690 Mon Sep 17 00:00:00 2001 From: "n.nakhostin" Date: Wed, 17 Sep 2025 09:29:03 +0330 Subject: [PATCH] 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. --- internal/customer/form.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/customer/form.go b/internal/customer/form.go index ae5c917..b5e42fb 100644 --- a/internal/customer/form.go +++ b/internal/customer/form.go @@ -50,7 +50,6 @@ type CustomerResponse struct { FullName *string `json:"full_name"` Username string `json:"username"` Email string `json:"email"` - Password string `json:"password"` Status string `json:"status"` Type string `json:"type"` Phone *string `json:"phone"` @@ -68,7 +67,6 @@ func (c *Customer) ToResponse(companies []*CompanySummary) *CustomerResponse { FullName: c.FullName, Username: c.Username, Email: c.Email, - Password: c.Password, Type: string(c.Type), Status: string(c.Status), Phone: c.Phone,