Example #1
0
        public async Task <IActionResult> UpsertTopicDocument([FromBody] dynamic topic)
        {
            List <dynamic> topicsList = new List <dynamic>
            {
                topic
            };

            if (await userRoleBusinessLogic.ValidateOrganizationalUnit(topic?.organizationalUnit))
            {
                var topics = await topicsResourcesBusinessLogic.UpsertTopicDocumentAsync(topicsList);

                return(Ok(topics));
            }
            return(StatusCode(403));
        }
Example #2
0
        public async Task <IActionResult> UpsertStaticHomePageDataAsync([FromBody] HomeContent homePageContent)
        {
            if (await userRoleBusinessLogic.ValidateOrganizationalUnit(homePageContent.OrganizationalUnit))
            {
                var contents = await staticResourceBusinessLogic.UpsertStaticHomePageDataAsync(homePageContent);

                return(Ok(contents));
            }
            return(StatusCode(403));
        }