示例#1
0
        public JsonResult createNewCloth([FromBody] Cloth cloth)
        {
            Response         response         = new Response();
            ClothDataHandler clothDataHandler = new ClothDataHandler(config);

            clothDataHandler.userId       = cloth.userId;
            clothDataHandler.clothType    = cloth.clothType;
            clothDataHandler.clothPicture = cloth.clothPicture;
            clothDataHandler.color        = cloth.color;
            clothDataHandler.material     = cloth.material;
            clothDataHandler.season       = cloth.season;
            cloth         = clothDataHandler.createNewCloth();
            response.data = JsonConvert.SerializeObject(cloth);
            return(Json(response));
        }