Update themeToggle.go
Cette révision appartient à :
Parent
fd2b094034
révision
38061f3521
1 fichiers modifiés avec 3 ajouts et 1 suppressions
|
@ -42,7 +42,9 @@ func toggleThemeHandler(c *gin.Context) {
|
||||||
http.SetCookie(c.Writer, &http.Cookie{Name: "theme2", Value: theme, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)})
|
http.SetCookie(c.Writer, &http.Cookie{Name: "theme2", Value: theme, Domain: getDomainName(), Path: "/", Expires: timeHelper.FewDaysLater(365)})
|
||||||
|
|
||||||
//Redirect user to page he was in beforehand
|
//Redirect user to page he was in beforehand
|
||||||
c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer")
|
if c.Query("no_redirect") == "" {
|
||||||
|
c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer")
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Référencer dans un nouveau ticket