(ctx context.Context, c *echo.Context)
| 870 | } |
| 871 | |
| 872 | func (s *Service) getGroup(ctx context.Context, c *echo.Context) (*store.GroupMessage, error) { |
| 873 | groupName, err := decodeGroupIdentifier(c.Param("groupID")) |
| 874 | if err != nil { |
| 875 | return nil, errors.Errorf("failed to parse group %v, error %v", c.Param("groupID"), err) |
| 876 | } |
| 877 | group, err := s.store.GetGroupByName(ctx, c.Param("workspaceID"), common.FormatGroupEmail(groupName)) |
| 878 | if err != nil { |
| 879 | return nil, errors.Errorf("failed to find group, error %v", err) |
| 880 | } |
| 881 | return group, nil |
| 882 | } |
| 883 | |
| 884 | func decodeGroupIdentifier(groupID string) (string, error) { |
| 885 | identifier, err := url.QueryUnescape(groupID) |
no test coverage detected