Redirect user to their home page

Redirect the user to their home page when they
report an issue that is already reported.
This commit is contained in:
Leni Kadali 2025-04-04 16:02:20 +03:00
parent a7a9ed1c04
commit d2c82e55aa

View file

@ -56,7 +56,8 @@ func NewReport(ctx *context.Context) {
if moderation.AlreadyReported(ctx, contentType, contentID) {
setMinimalContextData(ctx)
ctx.RenderWithErr(ctx.Tr("moderation.reported_already"), tplSubmitAbuseReport, nil)
ctx.Flash.Error(ctx.Tr("moderation.reported_already"))
ctx.Redirect(ctx.Doer.DashboardLink())
return
}