Example #1
0
        public JsonResult index()
        {
            try
            {
                return(Json(forumRepo.index()));
            }

            catch (Exception ex)
            {
                errors.log(ex);
                return(Json(null));
            }
        }
Example #2
0
        public JsonResult index([FromBody] int corporationId)
        {
            try
            {
                return(Json(softwareRepo.index(corporationId)));
            }

            catch (Exception ex)
            {
                errors.log(ex);
                return(Json(null));
            }
        }
Example #3
0
        public IActionResult index([FromBody] int forumId)
        {
            try
            {
                return(Json(messageRepo.index(forumId)));
            }

            catch (Exception ex)
            {
                errors.log(ex);
                return(Json(null));
            }
        }
        public IActionResult store([FromBody] ReactionModel reaction)
        {
            try
            {
                int authId = Convert.ToInt32(User.Claims.Single(c => c.Type == "id").Value);
                int id     = reactionRepo.store(reaction, authId);
                return(Json(reactionRepo.find(id)));
            }

            catch (Exception ex)
            {
                errors.log(ex);
                return(Json(null));
            }
        }