public void AddPhoto(Newtonsoft.Json.Linq.JObject photo) { WorkWithDb.AddNewPhoto(photo["NameImg"].ToString(), photo["Path"].ToString(), Convert.ToInt32(photo["idAlbum"])); }
public void AddPhoto(Newtonsoft.Json.Linq.JObject photo) { string userId = HttpContext.Session.Get("userId").ToString(); WorkWithDb.AddNewPhoto(photo["NameImg"].ToString(), photo["Path"].ToString(), Convert.ToInt32(photo["idAlbum"]), userId); }
public void AddPhoto([FromBody] Newtonsoft.Json.Linq.JObject photo) { string userId = WorkWithDb.getUserId(photo["token"].ToString()); WorkWithDb.AddNewPhoto(photo["NameImg"].ToString(), photo["Path"].ToString(), Convert.ToInt32(photo["idAlbum"]), userId); }