Skip to content

Commit 93a1c27

Browse files
committed
edit audit event field types
1 parent a191ee4 commit 93a1c27

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

base/audit_events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ var AuditEvents = events{
11651165
Description: "A document channel history was compacted by the Administrator",
11661166
MandatoryFields: AuditFields{
11671167
AuditFieldDocID: "document id",
1168-
AuditFieldChannels: "channels",
1168+
AuditFieldChannels: []string{"list", "of", "channels"},
11691169
AuditFieldSequence: "sequence",
11701170
},
11711171
mandatoryFieldGroups: []fieldGroup{

rest/audit_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,11 +2003,12 @@ func TestDocumentChannelHistoryCompactionAudit(t *testing.T) {
20032003
}
20042004

20052005
body := string(base.MustJSONMarshal(t, CompactDocChannelHistoryRequest{
2006-
DocIds: tc.docIDs,
2007-
Seq: 1,
2006+
Seq: 1,
20082007
}))
20092008
output := base.AuditLogContents(t, func(t testing.TB) {
2010-
RequireStatus(t, rt.SendAdminRequest(http.MethodPost, "/{{.keyspace}}/_channel_history/_compact", body), http.StatusOK)
2009+
for _, docID := range tc.docIDs {
2010+
RequireStatus(t, rt.SendAdminRequest(http.MethodPost, "/{{.keyspace}}/_channel_history/"+docID+"/compact", body), http.StatusOK)
2011+
}
20112012
})
20122013

20132014
for _, docID := range tc.docIDs {

rest/doc_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ func (h *handler) handleCompactDocChannelHistory() error {
992992
base.Audit(h.ctx(), base.AuditIDDocumentChannelHistoryCompact, base.AuditFields{
993993
base.AuditFieldDocID: docid,
994994
base.AuditFieldChannels: channels,
995-
base.AuditFieldSequence: req.Seq,
995+
base.AuditFieldSequence: strconv.FormatUint(req.Seq, 10),
996996
})
997997

998998
h.writeJSON(res)

0 commit comments

Comments
 (0)