コード例 #1
0
ファイル: KeepsController.cs プロジェクト: dallenpyrah/keepr
        public async Task <ActionResult <Keep> > CreateOneKeep([FromBody] Keep newKeep)
        {
            try
            {
                Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>();

                newKeep.CreatorId = userInfo.Id;
                newKeep.Creator   = userInfo;
                return(Ok(_kservice.CreateOneKeep(newKeep)));
            }
            catch (System.Exception err)
            {
                return(BadRequest(err.Message));
            }
        }