Этот коммит содержится в:
=Corey Hulen
2015-11-15 18:18:02 -08:00
родитель 48d2f86b90
Коммит 03c6dcbd86
18 изменённых файлов: 419 добавлений и 0 удалений

Просмотреть файл

@@ -86,3 +86,22 @@ func (s SqlAuditStore) Get(user_id string, limit int) StoreChannel {
return storeChannel
}
func (s SqlAuditStore) Delete(userId string) StoreChannel {
storeChannel := make(StoreChannel)
go func() {
result := StoreResult{}
if _, err := s.GetMaster().Exec("DELETE FROM Audits WHERE UserId = :userId",
map[string]interface{}{"userId": userId}); err != nil {
result.Err = model.NewAppError("SqlAuditStore.Delete", "We encountered an error deleting the audits", "user_id="+userId)
}
storeChannel <- result
close(storeChannel)
}()
return storeChannel
}