(ctx context.Context, c *echo.Context)
| 857 | } |
| 858 | |
| 859 | func (s *Service) getUser(ctx context.Context, c *echo.Context) (*store.UserMessage, error) { |
| 860 | uid, err := strconv.Atoi(c.Param("userID")) |
| 861 | if err != nil { |
| 862 | return nil, errors.Errorf("failed to parse user id %v, error %v", c.Param("userID"), err) |
| 863 | } |
| 864 | |
| 865 | user, err := s.store.GetUserByID(ctx, uid) |
| 866 | if err != nil { |
| 867 | return nil, errors.Errorf("failed to get user, error %v", err) |
| 868 | } |
| 869 | return user, nil |
| 870 | } |
| 871 | |
| 872 | func (s *Service) getGroup(ctx context.Context, c *echo.Context) (*store.GroupMessage, error) { |
| 873 | groupName, err := decodeGroupIdentifier(c.Param("groupID")) |
no test coverage detected