public async Task <ActionResult <Response <ResponseList <HomeAutomation.Models.Database.MyCalender.MyCalender> > > > GetMyCalenders() { var token = HttpContext.Request.Headers["Authorization"].FirstOrDefault(); var userToken = token.Split(' ')[1]; var user = UserToken.FromToken(userToken); return(Ok(HelperBox.DataToReponseList(true, await _calenderService.GetCalenders(user.UserId)))); }
public async Task <ActionResult <Response <ResponseList <ShoppingGroup> > > > GetAllMyShoppingGroups() { var token = HttpContext.Request.Headers["Authorization"].FirstOrDefault(); var userToken = token.Split(' ')[1]; var user = UserToken.FromToken(userToken); var shoppingGroups = await _shoppingGroupService.GetAllShoppingGroupsByUserId(user.UserId); return(Ok(HelperBox.DataToReponseList(true, shoppingGroups))); }
public async Task <ActionResult <Response <ResponseList <WorkDay> > > > GetWorkDays() { var token = HttpContext.Request.Headers["Authorization"].FirstOrDefault(); var userToken = token.Split(' ')[1]; var user = UserToken.FromToken(userToken); var workDays = await _workDayService.GetWorkDays(user.UserId); return(Ok(HelperBox.DataToReponseList(true, workDays))); }
public async Task <ActionResult <Response <ResponseList <HomeAutomation.Models.Database.MyCalender.MyCalender> > > > GetCalender() { return(Ok(HelperBox.DataToReponseList(true, await _calenderService.GetCalenders()))); }
public async Task <ActionResult <Response <ResponseList <string> > > > GetAutoComplete([FromBody] AutoComplete autoComplete) { var options = await _productService.AutoComplete(autoComplete.text); return(Ok(HelperBox.DataToReponseList(true, options))); }