// Index renders the index page for cards func (c Cards) Index() revel.Result { if cards, err := json.Marshal(models.GetAllCards()); err == nil { jsonCards := string(cards[:]) return c.Render(jsonCards) } return c.Render() }
// Index returns all of the cards func (c CardsAPI) Index() revel.Result { return c.RenderJson(models.GetAllCards()) }