From 2ebd29b0cd258b0bfb5cd6794a99dbff313e4252 Mon Sep 17 00:00:00 2001 From: Karan Balani <29383381+balanikaran@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:16:51 +0530 Subject: [PATCH] chore: remove unused emails var --- pkg/types/invite.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/types/invite.go b/pkg/types/invite.go index 1d76b07ecb..3ed44353ce 100644 --- a/pkg/types/invite.go +++ b/pkg/types/invite.go @@ -65,7 +65,7 @@ func (request *PostableBulkInviteRequest) UnmarshalJSON(data []byte) error { return err } - emails := make([]string, 0, len(temp.Invites)) + // check for duplicate emails in the same request seen := make(map[string]struct{}, len(temp.Invites)) for _, invite := range temp.Invites { email := invite.Email.StringValue() @@ -73,7 +73,6 @@ func (request *PostableBulkInviteRequest) UnmarshalJSON(data []byte) error { return errors.Newf(errors.TypeInvalidInput, errors.CodeInvalidInput, "Duplicate email in request: %s", email) } seen[email] = struct{}{} - emails = append(emails, email) } *request = PostableBulkInviteRequest(temp)