Update themeToggle.go
Cette révision appartient à :
Parent
90320dfa2b
révision
3eb23e1e9d
1 fichiers modifiés avec 1 ajouts et 1 suppressions
|
@ -42,7 +42,7 @@ 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
|
||||||
if c.Query("no_redirect") == "" {
|
if c.Request.URL.Query()["no_redirect"] == nil {
|
||||||
c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer")
|
c.Redirect(http.StatusSeeOther, c.Param("redirect") + "#footer")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
Référencer dans un nouveau ticket