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()); }
public async Task <IActionResult> DeleteAchievement(int id) { var result = await _achievementService.DeleteAchievementAsync(id); return(StatusCode(result.HttpStatusCode)); }