[MM-14846] Update EditAt for FileIds and Attachment in Post + Ignore FileIds Updates (#10540)
* Set EditAt for FileIds and Attachments; Disallow update/patch of FileIds in API Handler * Add custom comparison methods for StringArray and Post Attachments * gofmt * Split up comparison function to child structs * Naming consistency * gofmt
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
41fe33bbb1
Коммит
7c9837d9b1
@@ -36,6 +36,22 @@ type StringInterface map[string]interface{}
|
||||
type StringMap map[string]string
|
||||
type StringArray []string
|
||||
|
||||
func (sa StringArray) Equals(input StringArray) bool {
|
||||
|
||||
if len(sa) != len(input) {
|
||||
return false
|
||||
}
|
||||
|
||||
for index := range sa {
|
||||
|
||||
if sa[index] != input[index] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
var translateFunc goi18n.TranslateFunc = nil
|
||||
|
||||
func AppErrorInit(t goi18n.TranslateFunc) {
|
||||
|
||||
Ссылка в новой задаче
Block a user