示例#1
0
        public async Task <IActionResult> DeleteAchievementAsync(Guid achievementId, CancellationToken cancellationToken)
        {
            var achievement = await _achievementService.GetAchievementByIdAsync(achievementId, cancellationToken);

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

            await _achievementService.DeleteAchievementAsync(achievementId, cancellationToken);

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> DeleteAchievement(int id)
        {
            var result = await _achievementService.DeleteAchievementAsync(id);

            return(StatusCode(result.HttpStatusCode));
        }