public async Task <IActionResult> TrainingListForSelectedDate([FromBody] CurrentDisplayedDate currentDisplayedDate) { string userName = DebugAuth.getUserName(User); var list = await _trainingService.TrainingListForSelectedDate(currentDisplayedDate, userName); return(Ok(new { data = list, date = currentDisplayedDate.currentDate })); }
public async Task <IActionResult> UploadTrainingFromGpxFile(IFormFile FilePayload) { try { await _trainingService.InsertTraining(FilePayload, DebugAuth.getUserName(User)); return(Ok()); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <IActionResult> TrainingList() { string userName = DebugAuth.getUserName(User); try { var trainingList = await _trainingService.TrainingList(userName); return(Ok(trainingList)); } catch (Exception e) { return(BadRequest(e.Message)); } }