Пример #1
0
        public async Task <ActionResult <VaultKeep> > CreateAsync([FromBody] VaultKeep newVK)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                newVK.CreatorId = userInfo.Id;
                return(Ok(_vkService.CreateAsync(newVK, userInfo.Id)));
            }
            catch (System.Exception err)
            {
                return(BadRequest(err.Message));
            }
        }