public string Get(int channel, string toSay) { _alertingService.Speak(channel, toSay); _historyRepository.Save(new Models.SpeechHistoryItem() { Channel = channel, Speech = toSay, Date = DateTime.Now }); return("OK"); }
public string Get(int channel, string toSay) { try { if (!_snoozeService.IsSnoozed()) { _alertingService.Speak(channel, toSay); } _historyRepository.Save(new Models.SpeechHistoryItem() { Channel = channel, Speech = toSay, Date = DateTime.Now }); return("OK"); } catch (Exception ex) { return(ex.ToString()); } }