Skip to content

Commit f88c31b

Browse files
committed
edit audit event field types
1 parent f430079 commit f88c31b

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
@@ -1200,7 +1200,7 @@ var AuditEvents = events{
12001200
Description: "A document channel history was compacted by the Administrator",
12011201
MandatoryFields: AuditFields{
12021202
AuditFieldDocID: "document id",
1203-
AuditFieldChannels: "channels",
1203+
AuditFieldChannels: []string{"list", "of", "channels"},
12041204
AuditFieldSequence: "sequence",
12051205
},
12061206
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
@@ -984,7 +984,7 @@ func (h *handler) handleCompactDocChannelHistory() error {
984984
base.Audit(h.ctx(), base.AuditIDDocumentChannelHistoryCompact, base.AuditFields{
985985
base.AuditFieldDocID: docid,
986986
base.AuditFieldChannels: channels,
987-
base.AuditFieldSequence: req.Seq,
987+
base.AuditFieldSequence: strconv.FormatUint(req.Seq, 10),
988988
})
989989

990990
h.writeJSON(res)

0 commit comments

Comments
 (0)