Skip to content

Commit

Permalink
chore(handler): fix typos (#159)
Browse files Browse the repository at this point in the history
Because

- there are some typos

This commit

- fix typos in public hander
  • Loading branch information
donch1989 authored Dec 11, 2023
1 parent b97c981 commit fecb52a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/handler/publichandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1495,10 +1495,10 @@ func (h *PublicHandler) GetOrganizationMembership(ctx context.Context, req *mgmt
return nil, err
}

userID := strings.Split(req.Name, "/")[1]
orgID := strings.Split(req.Name, "/")[3]
orgID := strings.Split(req.Name, "/")[1]
userID := strings.Split(req.Name, "/")[3]

pbMembership, err := h.Service.GetOrganizationMembership(ctx, ctxUserUID, userID, orgID)
pbMembership, err := h.Service.GetOrganizationMembership(ctx, ctxUserUID, orgID, userID)
if err != nil {
span.SetStatus(1, err.Error())
return nil, err
Expand Down Expand Up @@ -1536,8 +1536,8 @@ func (h *PublicHandler) UpdateOrganizationMembership(ctx context.Context, req *m
return nil, err
}

userID := strings.Split(req.Membership.Name, "/")[1]
orgID := strings.Split(req.Membership.Name, "/")[3]
orgID := strings.Split(req.Membership.Name, "/")[1]
userID := strings.Split(req.Membership.Name, "/")[3]

if err := checkfield.CheckRequiredFields(req.Membership, requiredFieldsForOrganizationMembership); err != nil {
return nil, ErrCheckRequiredFields
Expand All @@ -1547,7 +1547,7 @@ func (h *PublicHandler) UpdateOrganizationMembership(ctx context.Context, req *m
return nil, ErrCheckOutputOnlyFields
}

pbMembership, err := h.Service.UpdateOrganizationMembership(ctx, ctxUserUID, userID, orgID, req.Membership)
pbMembership, err := h.Service.UpdateOrganizationMembership(ctx, ctxUserUID, orgID, userID, req.Membership)
if err != nil {
span.SetStatus(1, err.Error())
return nil, err
Expand Down

0 comments on commit fecb52a

Please sign in to comment.