func (c ReleasesController) APIV1Index(req *http.Request, r martrend.Render, params mart.Params) {
	relSource := params["_1"]

	if len(relSource) == 0 {
		r.JSON(400, map[string]string{"error": "Param 'source' must be non-empty"})
		return
	}

	relVerRecs, err := c.releasesRepo.FindAll(relSource)
	if err != nil {
		r.HTML(500, c.errorTmpl, err)
		return
	}

	// Show list of latest versions for the specific stemcell name
	viewRels := bhrelui.NewSameSourceReleases(bhrelsrepo.Source{Full: relSource}, relVerRecs, "")

	r.JSON(200, viewRels.ForAPI())
}
func (c ReleasesController) showMultipleReleases(r martrend.Render, relSource string) {
	relVerRecs, err := c.releasesRepo.FindAll(relSource)
	if err != nil {
		r.HTML(500, c.errorTmpl, err)
		return
	}

	var relName string

	// Fetch full release details for one of the versions to get real release name
	if len(relVerRecs) > 0 {
		rel, err := c.releaseVersionsRepo.Find(relVerRecs[0])
		if err != nil {
			r.HTML(500, c.errorTmpl, err)
			return
		}

		relName = rel.Name
	}

	viewRels := bhrelui.NewSameSourceReleases(bhrelsrepo.Source{Full: relSource}, relVerRecs, relName)

	r.HTML(200, c.showVersionsTmpl, viewRels)
}