Пример #1
0
        public async Task <ActionResult <string> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                return(Ok(_vks.Delete(id, userInfo.Id)));
            }
            catch (System.Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
Пример #2
0
        public async Task <ActionResult <string> > DeleteAsync(int id)
        {
            try
            {
                Profile userData = await HttpContext.GetUserInfoAsync <Profile>();

                _service.Delete(id, userData.Id);
                return(Ok("deleted"));
            }
            catch (System.Exception err)
            {
                return(BadRequest(err.Message));
            }
        }
Пример #3
0
        public async Task <ActionResult <string> > Delete(int id)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                _vks.Delete(id, userInfo);
                return(Ok("Successfully Deleted"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }