func UpdateItemHandler(params martini.Params, item types.Item, r render.Render, db *mgo.Database) { DB.Update(params["id"], item, db) r.JSON(200, DB.GetAll(db)) }
func PostItemHandler(item types.Item, r render.Render, db *mgo.Database) { DB.AddNew(item, db) r.JSON(200, DB.GetAll(db)) }
func DeleteItemHandler(params martini.Params, r render.Render, db *mgo.Database) { DB.Remove(params["id"], db) r.JSON(200, DB.GetAll(db)) }
func GetItemsHandler(r render.Render, db *mgo.Database) { r.JSON(200, DB.GetAll(db)) }