Disambiguates some units. (#19875)
* Disambiguates some units. * Updates DB attribute. * Updates some more error-prone units. * Updates some tests with legible constants. * Updates query for MySQL case sensitivity. * Fixes more casing issues. Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -1169,8 +1169,8 @@ func TestGetAllChannels(t *testing.T) {
|
||||
policyChannel := (sysManagerChannels)[0]
|
||||
policy, err := th.App.Srv().Store.RetentionPolicy().Save(&model.RetentionPolicyWithTeamAndChannelIDs{
|
||||
RetentionPolicy: model.RetentionPolicy{
|
||||
DisplayName: "Policy 1",
|
||||
PostDuration: model.NewInt64(30),
|
||||
DisplayName: "Policy 1",
|
||||
PostDurationDays: model.NewInt64(30),
|
||||
},
|
||||
ChannelIDs: []string{policyChannel.Id},
|
||||
})
|
||||
@@ -1621,8 +1621,8 @@ func TestSearchAllChannels(t *testing.T) {
|
||||
policyChannel := sysManagerChannels[0]
|
||||
policy, savePolicyErr := th.App.Srv().Store.RetentionPolicy().Save(&model.RetentionPolicyWithTeamAndChannelIDs{
|
||||
RetentionPolicy: model.RetentionPolicy{
|
||||
DisplayName: "Policy 1",
|
||||
PostDuration: model.NewInt64(30),
|
||||
DisplayName: "Policy 1",
|
||||
PostDurationDays: model.NewInt64(30),
|
||||
},
|
||||
ChannelIDs: []string{policyChannel.Id},
|
||||
})
|
||||
|
||||
@@ -1501,7 +1501,7 @@ func getTeamIcon(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "image/png")
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", 24*60*60)) // 24 hrs
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", model.DayInSeconds)) // 24 hrs
|
||||
w.Header().Set(model.HeaderEtagServer, etag)
|
||||
w.Write(img)
|
||||
}
|
||||
|
||||
@@ -1066,8 +1066,8 @@ func TestGetAllTeams(t *testing.T) {
|
||||
// Now actually create the policy and assign the team to it
|
||||
policy, savePolicyErr := th.App.Srv().Store.RetentionPolicy().Save(&model.RetentionPolicyWithTeamAndChannelIDs{
|
||||
RetentionPolicy: model.RetentionPolicy{
|
||||
DisplayName: "Policy 1",
|
||||
PostDuration: model.NewInt64(30),
|
||||
DisplayName: "Policy 1",
|
||||
PostDurationDays: model.NewInt64(30),
|
||||
},
|
||||
TeamIDs: []string{policyTeam.Id},
|
||||
})
|
||||
@@ -1379,8 +1379,8 @@ func TestSearchAllTeams(t *testing.T) {
|
||||
// Now actually create the policy and assign the team to it
|
||||
policy, savePolicyErr := th.App.Srv().Store.RetentionPolicy().Save(&model.RetentionPolicyWithTeamAndChannelIDs{
|
||||
RetentionPolicy: model.RetentionPolicy{
|
||||
DisplayName: "Policy 1",
|
||||
PostDuration: model.NewInt64(30),
|
||||
DisplayName: "Policy 1",
|
||||
PostDurationDays: model.NewInt64(30),
|
||||
},
|
||||
TeamIDs: []string{policyTeam.Id},
|
||||
})
|
||||
|
||||
@@ -364,7 +364,7 @@ func getDefaultProfileImage(c *Context, w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", 24*60*60)) // 24 hrs
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", model.DayInSeconds)) // 24 hrs
|
||||
w.Header().Set("Content-Type", "image/png")
|
||||
w.Write(img)
|
||||
}
|
||||
@@ -406,7 +406,7 @@ func getProfileImage(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
if readFailed {
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", 5*60)) // 5 mins
|
||||
} else {
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", 24*60*60)) // 24 hrs
|
||||
w.Header().Set("Cache-Control", fmt.Sprintf("max-age=%v, private", model.DayInSeconds)) // 24 hrs
|
||||
w.Header().Set(model.HeaderEtagServer, etag)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user