From ea372628ad2c49d02ee7f2b11e72d24747879f30 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 7 Dec 2019 22:28:47 +0100 Subject: [PATCH] Fix task index db --- pkg/models/tasks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index 370dbf68a..d4f47d02c 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -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)