|
@@ -8,11 +8,11 @@ using System.IO;
|
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json;
|
|
|
using System.Xml;
|
|
using System.Xml;
|
|
|
|
|
|
|
|
-namespace canalbis.Controllers
|
|
|
|
|
|
|
+namespace mobiparc.Controllers
|
|
|
{
|
|
{
|
|
|
- public class CanalbisController : ApiController
|
|
|
|
|
|
|
+ public class MobiparcController : ApiController
|
|
|
{
|
|
{
|
|
|
- // GET: api/Canalbis
|
|
|
|
|
|
|
+ // GET: api/Mobiparc
|
|
|
public IEnumerable<string> Get()
|
|
public IEnumerable<string> Get()
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -21,35 +21,28 @@ namespace canalbis.Controllers
|
|
|
return files.ToArray();
|
|
return files.ToArray();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // GET: api/Canalbis/5
|
|
|
|
|
|
|
+ // GET: api/Mobiparc/5
|
|
|
public string Get(string name)
|
|
public string Get(string name)
|
|
|
{
|
|
{
|
|
|
return File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(@"~/data/" + name + ".json"));
|
|
return File.ReadAllText(System.Web.HttpContext.Current.Server.MapPath(@"~/data/" + name + ".json"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // POST: api/Canalbis
|
|
|
|
|
- public string Post([FromBody]string value)
|
|
|
|
|
|
|
+ // POST: api/Mobiparc
|
|
|
|
|
+ public int Post([FromBody]string value)
|
|
|
{
|
|
{
|
|
|
var data = System.Web.HttpContext.Current.Request["data"];
|
|
var data = System.Web.HttpContext.Current.Request["data"];
|
|
|
var f= File.CreateText(System.Web.HttpContext.Current.Server.MapPath(@"~/data/" + Guid.NewGuid() +".json"));
|
|
var f= File.CreateText(System.Web.HttpContext.Current.Server.MapPath(@"~/data/" + Guid.NewGuid() +".json"));
|
|
|
f.Write(data);
|
|
f.Write(data);
|
|
|
f.Close();
|
|
f.Close();
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // XmlDocument doc = (XmlDocument)JsonConvert.DeserializeXmlNode(data);
|
|
|
|
|
-
|
|
|
|
|
- // doc.Save(System.Web.HttpContext.Current.Server.MapPath(@"~/data/" + Guid.NewGuid() + ".xml"));
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- return "ole";
|
|
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // PUT: api/Canalbis/5
|
|
|
|
|
|
|
+ // PUT: api/Mobiparc/5
|
|
|
public void Put(int id, [FromBody]string value)
|
|
public void Put(int id, [FromBody]string value)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // DELETE: api/Canalbis/5
|
|
|
|
|
|
|
+ // DELETE: api/Mobiparc/5
|
|
|
public void Delete(int id)
|
|
public void Delete(int id)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|