예제 #1
0
// @Title delete
// @Description delete the task
// @Param	taskId		path 	string	true "The taskId you want to delete"
// @Success 200 {string} delete success!
// @Failure 403 taskId is empty
// @router /:taskId [delete]
func (t *TaskController) Delete() {
	taskId := t.Ctx.Input.Param(":taskId")
	models.Delete(taskId)
	t.Data["json"] = "delete success!"
	t.ServeJSON()
}
예제 #2
0
// @Title delete
// @Description delete the object
// @Param	objectId		path 	string	true		"The objectId you want to delete"
// @Success 200 {string} delete success!
// @Failure 403 objectId is empty
// @router /:objectId [delete]
func (o *ObjectController) Delete() {
	objectId := o.Ctx.Input.Param(":objectId")
	models.Delete(objectId)
	o.Data["json"] = "delete success!"
	o.ServeJSON()
}