public async Task <IActionResult> GetAchievementByIdAsync(Guid achievementId, CancellationToken cancellationToken) { var item = await _achievementService.GetAchievementByIdAsync(achievementId, cancellationToken); if (item == null) { return(NotFound()); } return(Ok(item)); }
private async Task <bool> CheckDoesAchievementExistAsync(Guid achievementId, CancellationToken cancellationToken) { var achievement = await _achievementService.GetAchievementByIdAsync(achievementId, cancellationToken); return(achievement != null); }
public async Task <IActionResult> GetAchievementById(int id) { var result = await _achievementService.GetAchievementByIdAsync(id); return(StatusCode(result.HttpStatusCode, result.Data)); }