Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ishanarya0 committed Aug 20, 2024
1 parent f09dd7c commit 22237cb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/api/v1beta1/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func (h Handler) CreateUser(ctx context.Context, request *shieldv1beta1.CreateUs
haveEditPermission, key, err := h.checkIsWildcardEditable(ctx, metaDataMap)
if err != nil {
return nil, status.Error(codes.Internal, fmt.Sprintf("erro while updating %s key: %s", key, err.Error()))

}
if !haveEditPermission {
return nil, status.Error(codes.PermissionDenied, fmt.Sprintf("you are not authorized to update %s key", key))
Expand Down Expand Up @@ -615,7 +614,7 @@ func isValidEmail(email string) bool {
}

func (h Handler) checkIsWildcardEditable(ctx context.Context, metaDataMap metadata.Metadata) (bool, string, error) {
for k, _ := range metaDataMap {
for k := range metaDataMap {
urn := servicedata.CreateURN(h.serviceDataConfig.DefaultServiceDataProject, k)
key, err := h.serviceDataService.GetKeyByURN(ctx, urn)
if err != nil {
Expand Down

0 comments on commit 22237cb

Please sign in to comment.