public ActionResult Write([FromBody] ProcessSchema schema)
 {
     _repo.Write(new v1StorageModel.StorageModel()
     {
         Contents = schema.ToString(), Id = schema.Id, VersionOfContents = 6
     });
     return(Ok());
 }
Beispiel #2
0
        public ActionResult LatestWrite([FromBody] JObject jsonResult)
        {
            int version = CurrentVersionOfApiToMapTo;

            int.TryParse(Request.GetApiVersion(), out version);

            jsonResult["version"] = $"v{version}";
            var processSchema = new ProcessSchema(JsonConvert.SerializeObject(jsonResult));

            _repo.Write(new v1StorageModel.StorageModel()
            {
                Id = processSchema.Id, VersionOfContents = version, Contents = JsonConvert.SerializeObject(jsonResult)
            });
            return(Ok());
        }