public async Task <IActionResult> GetHero(string alexaHeroId) { var hero = await _repo.GetByAlexaId(alexaHeroId); if (hero == null) { return(NotFound()); } return(Ok(hero)); }
public async Task AddEntry(JournalEntry entry) { var hero = await _heroRepo.GetByAlexaId(entry.AlexaHeroId); await _journalRepo.AddEntry(new Journal { HeroId = hero.Id, Description = entry.Description, Duration = entry.Duration, EntryType = entry.Type, Title = entry.Title, DateTime = entry.DateTime }); }