MM-51321 Refactor audit log application. (#22481)
* Refactor audit log application. * Fix incorrect API Usage for Auditing * Fixups. * Rename Object audit to Auditable. Some small fixes. --------- Co-authored-by: Daniel Schalla <daniel@schalla.me>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9a38a52392
Коммит
7804debb7f
@@ -47,6 +47,19 @@ type UploadSession struct {
|
||||
ReqFileId string `json:"req_file_id"`
|
||||
}
|
||||
|
||||
func (us *UploadSession) Auditable() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"id": us.Id,
|
||||
"type": us.Type,
|
||||
"user_id": us.UserId,
|
||||
"channel_id": us.ChannelId,
|
||||
"filename": us.Filename,
|
||||
"file_size": us.FileSize,
|
||||
"remote_id": us.RemoteId,
|
||||
"ReqFileId": us.ReqFileId,
|
||||
}
|
||||
}
|
||||
|
||||
// PreSave is a utility function used to fill required information.
|
||||
func (us *UploadSession) PreSave() {
|
||||
if us.Id == "" {
|
||||
|
||||
Ссылка в новой задаче
Block a user