(id string, uu *user.UpdateUser)
| 72 | } |
| 73 | |
| 74 | func (m *UserManager) UpdateUser(id string, uu *user.UpdateUser) (*user.User, error) { |
| 75 | uu.UpdatedAt = time.Now().Unix() |
| 76 | |
| 77 | if err := uu.Validate(); err != nil { |
| 78 | return nil, err |
| 79 | } |
| 80 | |
| 81 | if uu.KeyIds != nil && len(uu.KeyIds) != 0 { |
| 82 | existing, err := m.ks.GetKeys(nil, uu.KeyIds, "") |
| 83 | if err != nil { |
| 84 | return nil, err |
| 85 | } |
| 86 | |
| 87 | if len(existing) == 0 { |
| 88 | return nil, internal_errors.NewNotFoundError("keys are not found") |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | return m.us.UpdateUser(id, uu) |
| 93 | } |
| 94 | |
| 95 | func (m *UserManager) UpdateUserViaTagsAndUserId(tags []string, uid string, uu *user.UpdateUser) (*user.User, error) { |
| 96 | uu.UpdatedAt = time.Now().Unix() |
nothing calls this directly
no test coverage detected