func DeleteLink(ctx *middleware.Context, params martini.Params) { id := params["id"] link := new(model.Link) link.Id = ParseInt(id) err := link.Delete() PanicIf(err) ctx.Set("success", true) ctx.JSON(200, ctx.Response) }