0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-14 10:08:30 -05:00

chore: Remove DeleteLocaleCookie

- Introduced in 9b261f52f0 and removed in
5b9557aef5.
This commit is contained in:
Gusted 2025-01-31 11:22:17 +01:00
parent 4d8f1e3e4b
commit 2d81bdbeb6
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 0 additions and 9 deletions

View file

@ -233,9 +233,6 @@ code.gitea.io/gitea/modules/web
RouteMock
RouteMockReset
code.gitea.io/gitea/modules/web/middleware
DeleteLocaleCookie
code.gitea.io/gitea/modules/zstd
NewWriter
Writer.Write

View file

@ -53,9 +53,3 @@ func Locale(resp http.ResponseWriter, req *http.Request) translation.Locale {
func SetLocaleCookie(resp http.ResponseWriter, lang string, maxAge int) {
SetSiteCookie(resp, "lang", lang, maxAge)
}
// DeleteLocaleCookie convenience function to delete the locale cookie consistently
// Setting the lang cookie will trigger the middleware to reset the language to previous state.
func DeleteLocaleCookie(resp http.ResponseWriter) {
SetSiteCookie(resp, "lang", "", -1)
}