public ActionResult <WishList> Create([FromBody] WishList newWishList) { try { return(Ok(_service.Create(newWishList))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task <ActionResult <WishList> > Create([FromBody] WishList newWishList) { try { Profile userInfo = await HttpContext.GetUserInfoAsync <Profile>(); newWishList.CreatorId = userInfo.Id; return(Ok(_service.Create(newWishList))); } catch (Exception e) { return(BadRequest(e.Message)); } }