Beispiel #1
0
        public async Task <ActionResult> DeleteList(Guid[] ids, bool returnCounts = false)
        {
            if (ids == null || ids.Length == 0)
            {
                return(Json(true));
            }
            await CurrentStore.DeleteErrorsAsync(ids.ToList()).ConfigureAwait(false);

            return(returnCounts ? Counts() : Json(new { url = Url.Action("Exceptions", new { store = CurrentStore.Name, log = CurrentLog, group = CurrentGroup }) }));
        }
Beispiel #2
0
        public async Task <ActionResult> Delete()
        {
            var toDelete = await GetSearchAsync().ConfigureAwait(false);

            // we don't care about success...if it's *already* deleted, that's fine
            // if we throw an exception trying to delete, that's another matter
            if (toDelete.Id.HasValue)
            {
                // optimized single route
                await CurrentStore.DeleteErrorAsync(toDelete.Id.Value).ConfigureAwait(false);
            }
            else
            {
                await CurrentStore.DeleteErrorsAsync(toDelete).ConfigureAwait(false);
            }

            return(toDelete.Id.HasValue
                ? Counts()
                : Json(new { url = Url.Action(nameof(Exceptions), new { store = CurrentStore.Name, group = CurrentGroup, log = CurrentLog }) }));
        }