vikunja-api/models/list_items_delete.go

15 lines
246 B
Go
Raw Normal View History

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