Example #1
0
        public IActionResult GetProjectMetadata(long projectId, [FromQuery] bool includeAuthor, [FromQuery] bool includeResponsiblePerson,
                                                [FromQuery] bool includeKind, [FromQuery] bool includeGenre)
        {
            var parameters = new GetProjectMetadataParameter
            {
                IncludeKind              = includeKind,
                IncludeGenre             = includeGenre,
                IncludeResponsiblePerson = includeResponsiblePerson,
                IncludeAuthor            = includeAuthor
            };
            var resultData = m_projectMetadataManager.GetProjectMetadata(projectId, parameters);

            if (resultData == null)
            {
                return(NotFound());
            }

            return(Ok(resultData));
        }
Example #2
0
        public IActionResult GetProjectMetadata(long projectId, [FromQuery] bool includeAuthor, [FromQuery] bool includeResponsiblePerson,
                                                [FromQuery] bool includeKind, [FromQuery] bool includeGenre, [FromQuery] bool includeOriginal, [FromQuery] bool includeKeyword, [FromQuery] bool includeCategory)
        {
            m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject);

            var parameters = new GetProjectMetadataParameter
            {
                IncludeKind              = includeKind,
                IncludeGenre             = includeGenre,
                IncludeOriginal          = includeOriginal,
                IncludeResponsiblePerson = includeResponsiblePerson,
                IncludeAuthor            = includeAuthor,
                IncludeKeyword           = includeKeyword,
                IncludeCategory          = includeCategory
            };
            var resultData = m_projectMetadataManager.GetProjectMetadata(projectId, parameters);

            if (resultData == null)
            {
                return(NotFound());
            }

            return(Ok(resultData));
        }