diff --git a/internal/customer/repository.go b/internal/customer/repository.go index 7cba42e..6de48eb 100644 --- a/internal/customer/repository.go +++ b/internal/customer/repository.go @@ -3,7 +3,6 @@ package customer import ( "context" "errors" - "slices" "time" "tm/pkg/logger" orm "tm/pkg/mongo" @@ -99,9 +98,9 @@ func (r *customerRepository) Login(ctx context.Context, id, deviceToken string) } // append device token to customer if not exists - if !slices.Contains(customer.DeviceToken, deviceToken) { - customer.DeviceToken = append(customer.DeviceToken, deviceToken) - } + // if !slices.Contains(customer.DeviceToken, deviceToken) { + customer.DeviceToken = []string{deviceToken} + // } // Update last login timestamp customer.LastLoginAt = &[]int64{time.Now().Unix()}[0]