Add task identifier #115

Merged
konrad merged 15 commits from feature/task-identifier into master 2019-12-07 22:28:47 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit ea372628ad - Show all commits

View File

@ -66,7 +66,7 @@ type Task struct {
// The task identifier, based on the list identifier and the task's index
Identifier string `xorm:"-" json:"identifier"`
// The task index, calculated per list
Index int64 `xorm:"int(11) not null 0" json:"index"`
Index int64 `xorm:"int(11) not null default 0" json:"index"`
// The UID is currently not used for anything other than caldav, which is why we don't expose it over json
UID string `xorm:"varchar(250) null" json:"-"`
@ -790,7 +790,7 @@ func (t *Task) Delete() (err error) {
// @Success 200 {object} models.Task "The task"
// @Failure 404 {object} models.Message "Task not found"
// @Failure 500 {object} models.Message "Internal error"
// @Router /tasks/all [get]
// @Router /tasks/{ID} [get]
func (t *Task) ReadOne() (err error) {
taskMap := make(map[int64]*Task, 1)