Remove start and end date fields on task collection
continuous-integration/drone/pr Build is failing Details

Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
kolaente 2020-04-07 21:40:58 +02:00
parent eed10fc46b
commit 15138b8e30
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 9 additions and 17 deletions

View File

@ -20,7 +20,6 @@ import (
"code.vikunja.io/api/pkg/timeutil"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web"
"time"
)
// Label represents a label
@ -212,10 +211,8 @@ func getUserTaskIDs(u *user.User) (taskIDs []int64, err error) {
}
tasks, _, _, err := getRawTasksForLists(lists, &taskOptions{
startDate: time.Unix(0, 0),
endDate: time.Unix(0, 0),
page: -1,
perPage: 0,
page: -1,
perPage: 0,
})
if err != nil {
return nil, err

View File

@ -20,15 +20,12 @@ package models
import (
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web"
"time"
)
// TaskCollection is a struct used to hold filter details and not clutter the Task struct with information not related to actual tasks.
type TaskCollection struct {
ListID int64 `param:"list"`
StartDateSortUnix int64 `query:"startdate"`
EndDateSortUnix int64 `query:"enddate"`
Lists []*List
ListID int64 `param:"list"`
Lists []*List
// The query parameter to sort by. This is for ex. done, priority, etc.
SortBy []string `query:"sort_by"`
@ -163,13 +160,11 @@ func (tf *TaskCollection) ReadAll(a web.Auth, search string, page int, perPage i
}
taskopts := &taskOptions{
search: search,
startDate: time.Unix(tf.StartDateSortUnix, 0),
endDate: time.Unix(tf.EndDateSortUnix, 0),
page: page,
perPage: perPage,
sortby: sort,
filters: filters,
search: search,
page: page,
perPage: perPage,
sortby: sort,
filters: filters,
}
shareAuth, is := a.(*LinkSharing)