@@ -172,68 +172,68 @@ func (a *AccountV2) RemoveTeam(team string) error {
172172}
173173
174174func  (a  * AccountV2 ) ChangeName (newName  string ) error  {
175- 	a .AccountV2 . Name  =  newName 
175+ 	a .Name  =  newName 
176176	a .UpdatedAt  =  time .Now ().Unix ()
177177	return  nil 
178178}
179179
180180func  (a  * AccountV2 ) ChangeFirstName (newFirstName  string ) error  {
181- 	a .AccountV2 . FirstName  =  newFirstName 
181+ 	a .FirstName  =  newFirstName 
182182	a .UpdatedAt  =  time .Now ().Unix ()
183183	return  nil 
184184}
185185
186186func  (a  * AccountV2 ) ChangeLastName (newLastName  string ) error  {
187- 	a .AccountV2 . LastName  =  newLastName 
187+ 	a .LastName  =  newLastName 
188188	a .UpdatedAt  =  time .Now ().Unix ()
189189	return  nil 
190190}
191191
192192func  (a  * AccountV2 ) ChangeLanguage (newLanguage  string ) error  {
193- 	a .AccountV2 . Language  =  newLanguage 
193+ 	a .Language  =  newLanguage 
194194	a .UpdatedAt  =  time .Now ().Unix ()
195195	return  nil 
196196}
197197
198198func  (a  * AccountV2 ) ChangeAvatarImageURL (url  string ) error  {
199- 	a .AccountV2 . AvatarImageUrl  =  url 
199+ 	a .AvatarImageUrl  =  url 
200200	a .UpdatedAt  =  time .Now ().Unix ()
201201	return  nil 
202202}
203203
204204func  (a  * AccountV2 ) ChangeAvatar (image  []byte , fileType  string ) error  {
205- 	a .AccountV2 . AvatarImage  =  image 
206- 	a .AccountV2 . AvatarFileType  =  fileType 
205+ 	a .AvatarImage  =  image 
206+ 	a .AvatarFileType  =  fileType 
207207	a .UpdatedAt  =  time .Now ().Unix ()
208208	return  nil 
209209}
210210
211211func  (a  * AccountV2 ) ChangeTags (tags  []string ) error  {
212- 	a .AccountV2 . Tags  =  tags 
212+ 	a .Tags  =  tags 
213213	a .UpdatedAt  =  time .Now ().Unix ()
214214	return  nil 
215215}
216216
217217func  (a  * AccountV2 ) ChangeOrganizationRole (role  proto.AccountV2_Role_Organization ) error  {
218- 	a .AccountV2 . OrganizationRole  =  role 
218+ 	a .OrganizationRole  =  role 
219219	if  role  >=  proto .AccountV2_Role_Organization_ADMIN  {
220- 		a .AccountV2 . EnvironmentRoles  =  []* proto.AccountV2_EnvironmentRole {}
220+ 		a .EnvironmentRoles  =  []* proto.AccountV2_EnvironmentRole {}
221221	}
222222	a .UpdatedAt  =  time .Now ().Unix ()
223223	return  nil 
224224}
225225
226226func  (a  * AccountV2 ) ChangeEnvironmentRole (roles  []* proto.AccountV2_EnvironmentRole ) error  {
227- 	a .AccountV2 . EnvironmentRoles  =  roles 
227+ 	a .EnvironmentRoles  =  roles 
228228	a .UpdatedAt  =  time .Now ().Unix ()
229229	return  nil 
230230}
231231
232232func  (a  * AccountV2 ) PatchEnvironmentRole (patchRoles  []* proto.AccountV2_EnvironmentRole ) error  {
233233	for  _ , p  :=  range  patchRoles  {
234- 		e  :=  getEnvironmentRole (a .AccountV2 . EnvironmentRoles , p .EnvironmentId )
234+ 		e  :=  getEnvironmentRole (a .EnvironmentRoles , p .EnvironmentId )
235235		if  e  ==  nil  {
236- 			a .AccountV2 . EnvironmentRoles  =  append (a . AccountV2 .EnvironmentRoles , p )
236+ 			a .EnvironmentRoles  =  append (a .EnvironmentRoles , p )
237237			continue 
238238		}
239239		e .Role  =  p .Role 
@@ -243,7 +243,7 @@ func (a *AccountV2) PatchEnvironmentRole(patchRoles []*proto.AccountV2_Environme
243243}
244244
245245func  (a  * AccountV2 ) ChangeLastSeen (lastSeen  int64 ) error  {
246- 	a .AccountV2 . LastSeen  =  lastSeen 
246+ 	a .LastSeen  =  lastSeen 
247247	a .UpdatedAt  =  time .Now ().Unix ()
248248	return  nil 
249249}
@@ -258,13 +258,13 @@ func getEnvironmentRole(roles []*proto.AccountV2_EnvironmentRole, envID string)
258258}
259259
260260func  (a  * AccountV2 ) Enable () error  {
261- 	a .AccountV2 . Disabled  =  false 
261+ 	a .Disabled  =  false 
262262	a .UpdatedAt  =  time .Now ().Unix ()
263263	return  nil 
264264}
265265
266266func  (a  * AccountV2 ) Disable () error  {
267- 	a .AccountV2 . Disabled  =  true 
267+ 	a .Disabled  =  true 
268268	a .UpdatedAt  =  time .Now ().Unix ()
269269	return  nil 
270270}
@@ -291,17 +291,17 @@ func (a *AccountV2) AddSearchFilter(
291291		EnvironmentId :    environmentID ,
292292		DefaultFilter :    defaultFilter ,
293293	}
294- 	a .AccountV2 . SearchFilters  =  append (a . AccountV2 .SearchFilters , searchFilter )
294+ 	a .SearchFilters  =  append (a .SearchFilters , searchFilter )
295295	a .UpdatedAt  =  time .Now ().Unix ()
296296	return  searchFilter , nil 
297297}
298298
299299func  (a  * AccountV2 ) DeleteSearchFilter (id  string ) error  {
300- 	for  i , f  :=  range  a .AccountV2 . SearchFilters  {
300+ 	for  i , f  :=  range  a .SearchFilters  {
301301		if  f .Id  ==  id  {
302- 			a .AccountV2 . SearchFilters  =  append (a .AccountV2 . SearchFilters [:i ], a . AccountV2 .SearchFilters [i + 1 :]... )
303- 			if  len (a .AccountV2 . SearchFilters ) ==  0  {
304- 				a .AccountV2 . SearchFilters  =  nil 
302+ 			a .SearchFilters  =  append (a .SearchFilters [:i ], a .SearchFilters [i + 1 :]... )
303+ 			if  len (a .SearchFilters ) ==  0  {
304+ 				a .SearchFilters  =  nil 
305305			}
306306			a .UpdatedAt  =  time .Now ().Unix ()
307307			return  nil 
@@ -311,7 +311,7 @@ func (a *AccountV2) DeleteSearchFilter(id string) error {
311311}
312312
313313func  (a  * AccountV2 ) ChangeSearchFilterName (id  string , name  string ) error  {
314- 	for  _ , f  :=  range  a .AccountV2 . SearchFilters  {
314+ 	for  _ , f  :=  range  a .SearchFilters  {
315315		if  f .Id  ==  id  {
316316			f .Name  =  name 
317317			a .UpdatedAt  =  time .Now ().Unix ()
@@ -322,7 +322,7 @@ func (a *AccountV2) ChangeSearchFilterName(id string, name string) error {
322322}
323323
324324func  (a  * AccountV2 ) ChangeSearchFilterQuery (id  string , query  string ) error  {
325- 	for  _ , f  :=  range  a .AccountV2 . SearchFilters  {
325+ 	for  _ , f  :=  range  a .SearchFilters  {
326326		if  f .Id  ==  id  {
327327			f .Query  =  query 
328328			a .UpdatedAt  =  time .Now ().Unix ()
@@ -333,7 +333,7 @@ func (a *AccountV2) ChangeSearchFilterQuery(id string, query string) error {
333333}
334334
335335func  (a  * AccountV2 ) ChangeDefaultSearchFilter (id  string , defaultFilter  bool ) error  {
336- 	for  _ , f  :=  range  a .AccountV2 . SearchFilters  {
336+ 	for  _ , f  :=  range  a .SearchFilters  {
337337		if  f .Id  ==  id  {
338338			// Since there is only one default setting for a filter target, set the existing default to OFF. 
339339			if  defaultFilter  {
@@ -349,7 +349,7 @@ func (a *AccountV2) ChangeDefaultSearchFilter(id string, defaultFilter bool) err
349349}
350350
351351func  (a  * AccountV2 ) resetDefaultFilter (targetFilter  proto.FilterTargetType , environmentID  string ) {
352- 	for  _ , f  :=  range  a .AccountV2 . SearchFilters  {
352+ 	for  _ , f  :=  range  a .SearchFilters  {
353353		if  f .DefaultFilter  && 
354354			targetFilter  ==  f .FilterTargetType  && 
355355			environmentID  ==  f .EnvironmentId  {
0 commit comments