vikunja-api/models/list_items_delete.go

14 lines
262 B
Go

package models
// Delete implements the delete method for listItem
func (i *ListItem) Delete(id int64, doer *User) (err error) {
// Check if it exists
_, err = GetListItemByID(id)
if err != nil {
return
}
_, err = x.ID(id).Delete(ListItem{})
return
}