Ejemplo n.º 1
0
        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))));
        }
Ejemplo n.º 2
0
        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)));
        }
Ejemplo n.º 3
0
        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)));
        }
Ejemplo n.º 4
0
 public async Task <ActionResult <Response <ResponseList <HomeAutomation.Models.Database.MyCalender.MyCalender> > > > GetCalender()
 {
     return(Ok(HelperBox.DataToReponseList(true, await _calenderService.GetCalenders())));
 }
Ejemplo n.º 5
0
        public async Task <ActionResult <Response <ResponseList <string> > > > GetAutoComplete([FromBody] AutoComplete autoComplete)
        {
            var options = await _productService.AutoComplete(autoComplete.text);

            return(Ok(HelperBox.DataToReponseList(true, options)));
        }