fixed receiver name
Some checks are pending
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
konrad 2019-01-14 22:36:16 +01:00
parent f6f713ee35
commit 8e2429d3b9
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -71,14 +71,14 @@ func dummy2() {
// @Success 200 {array} models.List "The tasks"
// @Failure 500 {object} models.Message "Internal error"
// @Router /tasks/all [get]
func (lt *ListTask) ReadAll(search string, a web.Auth, page int) (interface{}, error) {
func (t *ListTask) ReadAll(search string, a web.Auth, page int) (interface{}, error) {
u, err := getUserWithError(a)
if err != nil {
return nil, err
}
var sortby SortBy
switch lt.Sorting {
switch t.Sorting {
case "priority":
sortby = SortTasksByPriorityDesc
case "prioritydesc":
@ -95,7 +95,7 @@ func (lt *ListTask) ReadAll(search string, a web.Auth, page int) (interface{}, e
sortby = SortTasksByUnsorted
}
return GetTasksByUser(search, u, page, sortby, time.Unix(lt.StartDateSortUnix, 0), time.Unix(lt.EndDateSortUnix, 0))
return GetTasksByUser(search, u, page, sortby, time.Unix(t.StartDateSortUnix, 0), time.Unix(t.EndDateSortUnix, 0))
}
//GetTasksByUser returns all tasks for a user