Exemplo n.º 1
0
        public async Task <IActionResult> DeleteThesis(int id)
        {
            FunctionReturnDTO result = await _thesisService.DeleteThesis(id, User.FindFirstValue(ClaimTypes.NameIdentifier));

            if (result.Success)
            {
                return(RedirectToAction("Browse", "Thesis"));
            }
            else
            {
                return(BadRequest());
            }
        }
        public async Task <IActionResult> Delete(string id)
        {
            await _thesisService.DeleteThesis(id);

            return(RedirectToAction(nameof(Index)));
        }