Esempio n. 1
0
        public async Task <IActionResult> DeleteThemeAsync(int id)
        {
            if (themeService.UserCanDeleteTheme(GetCurrentUserId(), id))
            {
                await themeService.DeleteThemeAsync(id);

                return(NoContent());
            }
            return(Unauthorized());
        }
Esempio n. 2
0
        public async Task <ActionResult <IList <ThemeDto> > > DeleteTheme(long themeId)
        {
            var themeResult = await _themeService.DeleteThemeAsync(themeId);

            return(themeResult.ToActionResult());
        }