diff options
Diffstat (limited to 'routers/api/v1/notify')
-rw-r--r-- | routers/api/v1/notify/repo.go | 2 | ||||
-rw-r--r-- | routers/api/v1/notify/user.go | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/routers/api/v1/notify/repo.go b/routers/api/v1/notify/repo.go index 0bc48aeb16..af4507f896 100644 --- a/routers/api/v1/notify/repo.go +++ b/routers/api/v1/notify/repo.go @@ -171,7 +171,7 @@ func ReadRepoNotifications(ctx *context.APIContext) { // "$ref": "#/responses/empty" lastRead := int64(0) - qLastRead := strings.Trim(ctx.FormString("last_read_at"), " ") + qLastRead := ctx.FormTrim("last_read_at") if len(qLastRead) > 0 { tmpLastRead, err := time.Parse(time.RFC3339, qLastRead) if err != nil { diff --git a/routers/api/v1/notify/user.go b/routers/api/v1/notify/user.go index c4b126c567..c2178b4dee 100644 --- a/routers/api/v1/notify/user.go +++ b/routers/api/v1/notify/user.go @@ -6,7 +6,6 @@ package notify import ( "net/http" - "strings" "time" "code.gitea.io/gitea/models" @@ -122,7 +121,7 @@ func ReadNotifications(ctx *context.APIContext) { // "$ref": "#/responses/empty" lastRead := int64(0) - qLastRead := strings.Trim(ctx.FormString("last_read_at"), " ") + qLastRead := ctx.FormTrim("last_read_at") if len(qLastRead) > 0 { tmpLastRead, err := time.Parse(time.RFC3339, qLastRead) if err != nil { |