(ctx context.Context, req *userv1.GetSettingsRequest)
| 10 | ) |
| 11 | |
| 12 | func (s *UserServer) GetSettings(ctx context.Context, req *userv1.GetSettingsRequest) (*userv1.GetSettingsResponse, error) { |
| 13 | actor, err := contextutil.GetActor(ctx) |
| 14 | if err != nil { |
| 15 | return nil, shared.ErrInvalidActor("user not authenticated") |
| 16 | } |
| 17 | |
| 18 | userSettings, err := s.userService.GetUserSettings(ctx, actor.ID) |
| 19 | if err != nil { |
| 20 | s.logger.Error("Failed to get user settings", "error", err, "userID", actor.ID) |
| 21 | return nil, shared.ErrInternal("failed to get user settings") |
| 22 | } |
| 23 | |
| 24 | return &userv1.GetSettingsResponse{ |
| 25 | Settings: mapper.MapModelSettingsToProto(userSettings), |
| 26 | }, nil |
| 27 | } |
nothing calls this directly
no test coverage detected