vikunja-api/models/list_items_delete.go

15 lines
250 B
Go
Raw Normal View History

2018-07-11 11:44:17 +02:00
package models
// Delete implements the delete method for listItem
2018-07-12 22:42:41 +02:00
func (i *ListItem) Delete(id int64) (err error) {
2018-07-11 11:44:17 +02:00
// Check if it exists
_, err = GetListItemByID(id)
2018-07-11 11:44:17 +02:00
if err != nil {
return
}
_, err = x.ID(id).Delete(ListItem{})
return
}