func entriesNew(c *app.Context) { s, entry := api.EntryPost(c) if s != 201 { c.Error(s) return } c.JSON(entry) }
func entriesRandom(c *app.Context) { s, entry := api.EntryRand(c) if s != 200 { c.Error(s) return } c.JSON(entry) }
func entriesGet(c *app.Context) { id := c.Seg(2) s, entry := api.EntryGet(c, id) if s != 200 { c.Error(s) return } c.JSON(entry) }