Example #1
0
        public async Task <IActionResult> GetAllPagesForOrganisationAsync(
            [FromQuery] int organisationId,
            CancellationToken token = default)
        {
            try
            {
                var serviceResult = await _pagesService.GetAllPagesForOrganisationAsync(organisationId, token);

                return(new OkObjectResult(Mapper.Map <IEnumerable <CreatePageResponseDto> >(serviceResult)));
            }
            catch (BadRequestException e)
            {
                return(new BadRequestObjectResult(e.Message));
            }
        }