public string[] SearchAlbum([FromBody] Newtonsoft.Json.Linq.JObject album) { string userId = WorkWithDb.getUserId(album["token"].ToString()); string[] albums = WorkWithDb.SearchAlbum(userId.ToString()).ToArray(); return(albums); }
public int AddAlbum([FromBody] Newtonsoft.Json.Linq.JObject album) { string userId = WorkWithDb.getUserId(album["token"].ToString()); int id = WorkWithDb.AddAlbum(userId, album["nameOfAlbum"].ToString()); return(id); }
public string[] SearchPhoto([FromBody] Newtonsoft.Json.Linq.JObject idUser) { string userId = WorkWithDb.getUserId(idUser["token"].ToString()); string[] array = WorkWithDb.PathPhoto(userId, Convert.ToInt32(idUser["idAlbum"])).ToArray(); return(array); }
public void PhotoDelete([FromBody] Newtonsoft.Json.Linq.JObject photo) { string userId = WorkWithDb.getUserId(photo["token"].ToString()); WorkWithDb.DeletePhoto(photo["nameImg"].ToString(), Convert.ToInt32(photo["idAlbum"]), userId); }