diff options
author | 6543 <6543@obermui.de> | 2020-11-14 15:05:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 14:05:40 +0000 |
commit | 3f3447a1ea8ed0d89ed862b7da506c97030d670e (patch) | |
tree | c01d363dce326efe240c26c8cda2d886a73d28cd /routers/api/v1/notify | |
parent | 374ff60465ace2471d0dde121c6a3e1527ab0bec (diff) | |
download | gitea-3f3447a1ea8ed0d89ed862b7da506c97030d670e.tar.gz gitea-3f3447a1ea8ed0d89ed862b7da506c97030d670e.zip |
API: Fix GetQueryBeforeSince (#13559)
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 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/notify/repo.go b/routers/api/v1/notify/repo.go index 49b493aa4f..cc66e0f743 100644 --- a/routers/api/v1/notify/repo.go +++ b/routers/api/v1/notify/repo.go @@ -101,7 +101,7 @@ func ListRepoNotifications(ctx *context.APIContext) { before, since, err := utils.GetQueryBeforeSince(ctx) if err != nil { - ctx.InternalServerError(err) + ctx.Error(http.StatusUnprocessableEntity, "GetQueryBeforeSince", err) return } opts := models.FindNotificationOptions{ diff --git a/routers/api/v1/notify/user.go b/routers/api/v1/notify/user.go index 9c3f9b1472..373c88d372 100644 --- a/routers/api/v1/notify/user.go +++ b/routers/api/v1/notify/user.go @@ -63,7 +63,7 @@ func ListNotifications(ctx *context.APIContext) { before, since, err := utils.GetQueryBeforeSince(ctx) if err != nil { - ctx.InternalServerError(err) + ctx.Error(http.StatusUnprocessableEntity, "GetQueryBeforeSince", err) return } opts := models.FindNotificationOptions{ |