[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
Этот коммит содержится в:
Daniel Schalla
2019-04-04 20:01:21 +02:00
коммит произвёл GitHub
родитель 41fe33bbb1
Коммит 7c9837d9b1
9 изменённых файлов: 519 добавлений и 4 удалений

Просмотреть файл

@@ -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) {