示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }