Exemple #1
0
        public IActionResult SetBooksMonitored([FromBody] BooksMonitoredResource resource)
        {
            _bookService.SetMonitored(resource.BookIds, resource.Monitored);

            if (resource.BookIds.Count == 1)
            {
                _bookService.SetBookMonitored(resource.BookIds.First(), resource.Monitored);
            }
            else
            {
                _bookService.SetMonitored(resource.BookIds, resource.Monitored);
            }

            return(Accepted(MapToResource(_bookService.GetBooks(resource.BookIds), false)));
        }
Exemple #2
0
        public IActionResult SetBooksMonitored([FromBody] BooksMonitoredResource resource)
        {
            _bookService.SetMonitored(resource.BookIds, resource.Monitored);

            return(Accepted(MapToResource(_bookService.GetBooks(resource.BookIds), false)));
        }