public IActionResult SaveTimer(TimerIdentifier timer) { if (string.IsNullOrEmpty(timer.TimerName)) { return(BadRequest()); } timerManager.SaveTimer(timer.TimerName); return(Ok()); }
public async Task <IActionResult> LoadTimer(TimerIdentifier timer) { if (string.IsNullOrEmpty(timer.TimerName)) { return(BadRequest()); } if (!await timerManager.LoadTimer(timer.TimerName)) { return(BadRequest()); } return(Ok()); }