(username, filePath string)
| 44 | } |
| 45 | |
| 46 | func TriggerPendingLog(username, filePath string) { |
| 47 | debounceMu.Lock() |
| 48 | defer debounceMu.Unlock() |
| 49 | |
| 50 | if state, exists := debounceStates[username]; exists { |
| 51 | state.Mu.Lock() |
| 52 | if state.Timer != nil { |
| 53 | state.Timer.Stop() |
| 54 | } |
| 55 | state.Mu.Unlock() |
| 56 | |
| 57 | createWriteFileLog(state.Username, state.FilePath) |
| 58 | |
| 59 | delete(debounceStates, username) |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | func createWriteFileLog(username, filePath string) { |
| 64 | logs.CreateLog(types.AuditLog{ |
no test coverage detected