Example #1
0
        public async Task <IActionResult> PostEntryLiked(Guid postEntryId)
        {
            var userIdStr = User.Claims?.FirstOrDefault(x => x.Type == "OryxUser")?.Value;
            var userId    = Guid.Parse(userIdStr);
            var request   = new StreamReader(HttpContext.Request.Body).ReadToEnd();

            var apiMsg = await ApiMessage.Wrap(async() =>
            {
                await postEntryBusiness.SetLiked(userId, postEntryId);
            });

            return(Json(apiMsg));
        }