Exemple #1
0
        public IActionResult GetUserCities([FromBody] User val)
        {
            ICityRepository crp            = new SqLiteCityRepository();
            User            user           = val;
            List <City>     granted_cities = crp.GetCitiesByUserId(user.Name);
            string          data           = JsonConvert.SerializeObject(granted_cities);

            return(Json(data));
        }
Exemple #2
0
        public IActionResult Post([FromBody] UserId userId)
        {
            logger.Debug("city controller receive {0}", userId.Id);
            ICityRepository crp            = new SqLiteCityRepository();
            List <City>     granted_cities = crp.GetCitiesByUserId(userId.Id);
            string          data           = JsonConvert.SerializeObject(granted_cities);

            return(Json(data));
        }