public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var VideoDTO = await _apiService.SingleAsync <Video, VideoDTO>(id, true);

            if (VideoDTO == null)
            {
                return(NotFound());
            }

            var sucess = await _apiService.DeleteAsync <Video>(VideoDTO.Id);

            return(RedirectToAction(nameof(Index)));
        }
예제 #2
0
        public async Task <HttpResponseMessage> Delete <T>(IDiscordObjectDto data) where T : IAPIPayload
        {
            var payload = GetPayload <T>(data);

            return(await _apiService.DeleteAsync(payload));
        }