Exemplo n.º 1
0
        public async Task <IHttpActionResult> AddArtifactsToCollectionAsync(
            int id, string add, [FromBody] ISet <int> artifactIds)
        {
            if (artifactIds.IsEmpty())
            {
                throw new BadRequestException(
                          ErrorMessages.Collections.AddArtifactsInvalidParameters, ErrorCodes.BadRequest);
            }

            var result = await _collectionsService.AddArtifactsToCollectionAsync(id, artifactIds, Session.UserId);

            return(Ok(result));
        }