More event logs point

This commit is contained in:
2024-10-14 22:23:51 +08:00
parent a4a139c56e
commit 974c5d9700
13 changed files with 51 additions and 19 deletions

View File

@ -10,13 +10,13 @@ var writeEventQueue []models.ActionEvent
var writeAuditQueue []models.AuditRecord
// AddEvent to keep operation logs by user themselves clear to query
func AddEvent(user models.Account, event, target, ip, ua string) {
func AddEvent(user uint, event, target, ip, ua string) {
writeEventQueue = append(writeEventQueue, models.ActionEvent{
Type: event,
Target: target,
IpAddress: ip,
UserAgent: ua,
AccountID: user.ID,
AccountID: user,
})
}