From dc9fe38735c9c9c9b5e4ec76acdc769c933dbec7 Mon Sep 17 00:00:00 2001 From: UlricQin Date: Wed, 1 Dec 2021 11:26:44 +0800 Subject: [PATCH] modify args: hours->days --- src/webapi/router/router_task.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webapi/router/router_task.go b/src/webapi/router/router_task.go index 643bc9b3..545c9520 100644 --- a/src/webapi/router/router_task.go +++ b/src/webapi/router/router_task.go @@ -19,7 +19,7 @@ import ( func taskGets(c *gin.Context) { bgid := ginx.UrlParamInt64(c, "id") mine := ginx.QueryBool(c, "mine", false) - hours := ginx.QueryInt64(c, "hours", 24*7) + days := ginx.QueryInt64(c, "days", 7) limit := ginx.QueryInt(c, "limit", 20) query := ginx.QueryStr(c, "query", "") user := c.MustGet("user").(*models.User) @@ -29,7 +29,7 @@ func taskGets(c *gin.Context) { creator = user.Username } - beginTime := time.Now().Unix() - hours*3600 + beginTime := time.Now().Unix() - days*24*3600 total, err := models.TaskRecordTotal(bgid, beginTime, creator, query) ginx.Dangerous(err)