Add whitespace linter (#24855)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
176370e175
Коммит
0d5a8b8841
@@ -127,7 +127,6 @@ func (c *Context) SessionRequired() {
|
||||
if !*c.App.Config().ServiceSettings.EnableUserAccessTokens &&
|
||||
c.AppContext.Session().Props[model.SessionPropType] == model.SessionTypeUserAccessToken &&
|
||||
c.AppContext.Session().Props[model.SessionPropIsBot] != model.SessionPropIsBotValue {
|
||||
|
||||
c.Err = model.NewAppError("", "api.context.session_expired.app_error", nil, "UserAccessToken", http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -451,7 +451,6 @@ func TestHandlerServeCSPHeader(t *testing.T) {
|
||||
assert.Equal(t, 200, response.Code)
|
||||
assert.Equal(t, []string{"frame-ancestors " + frameAncestors + "; script-src 'self' cdn.rudderlabs.com js.stripe.com/v3 'unsafe-eval' 'unsafe-inline'"}, response.Header()["Content-Security-Policy"])
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func TestGenerateDevCSP(t *testing.T) {
|
||||
|
||||
@@ -60,7 +60,6 @@ func (w *Web) InitStatic() {
|
||||
}
|
||||
|
||||
func root(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if !CheckClientCompatibility(r.UserAgent()) {
|
||||
w.Header().Set("Cache-Control", "no-store")
|
||||
data := renderUnsupportedBrowser(c.AppContext, r)
|
||||
|
||||
@@ -45,7 +45,6 @@ type SystemBrowser struct {
|
||||
}
|
||||
|
||||
func renderUnsupportedBrowser(ctx *request.Context, r *http.Request) templates.Data {
|
||||
|
||||
data := templates.Data{
|
||||
Props: map[string]any{
|
||||
"DownloadAppOrUpgradeBrowserString": ctx.T("web.error.unsupported_browser.download_app_or_upgrade_browser"),
|
||||
@@ -89,7 +88,6 @@ func renderUnsupportedBrowser(ctx *request.Context, r *http.Request) templates.D
|
||||
}
|
||||
|
||||
return data
|
||||
|
||||
}
|
||||
|
||||
func renderMattermostAppMac(ctx *request.Context) MattermostApp {
|
||||
|
||||
Ссылка в новой задаче
Block a user