diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-10 02:42:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-09 18:42:31 +0000 |
commit | 84c78650cc2d7c6480f397d59e1d4e33a5f71d19 (patch) | |
tree | 17b535c6c4a49a1260fa09467157e43f8522aacb /routers | |
parent | 321383db22b19e302aafe59194f0b6539257d90f (diff) | |
download | gitea-84c78650cc2d7c6480f397d59e1d4e33a5f71d19.tar.gz gitea-84c78650cc2d7c6480f397d59e1d4e33a5f71d19.zip |
Fix notification list bugs (#25781)
Fix #25627
1. `ctx.Data["Link"]` should use relative URL but not AppURL
2. The `data-params` is incorrect because it doesn't contain "page". JS
can simply use "window.location.search" to construct the AJAX URL
3. The `data-xxx` and `id` in notification_subscriptions.tmpl were
copied&pasted, they don't have affect.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/user/notification.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go index e0aa92879f..cae12f4126 100644 --- a/routers/web/user/notification.go +++ b/routers/web/user/notification.go @@ -186,7 +186,7 @@ func NotificationStatusPost(ctx *context.Context) { if ctx.Written() { return } - ctx.Data["Link"] = setting.AppURL + "notifications" + ctx.Data["Link"] = setting.AppSubURL + "/notifications" ctx.Data["SequenceNumber"] = ctx.Req.PostFormValue("sequence-number") ctx.HTML(http.StatusOK, tplNotificationDiv) |