using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;

using CommonHelpers;
using BookRegistry.Server.DB;

namespace BookRegistry.Server {

//**************************************************************************************************
partial class HomeController {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[HttpPost("[action]")][AllowAnonymous]
public Task<dynamic> GetBookSelectionCollections( ApiArgumentsBase args ) =>
Do_A(args,async()=>{ // GetBookSelectionCollections_Response
//-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   var spr = await GetBookSelectionCollections_SP.EXEC_A();
   if ( !spr.Success )
      return new GeneralApiResponse( spr );
   return new GetBookSelectionCollections_Response( spr ){
      Authors     = spr.List_1,
      Categories  = spr.List_2,
      Genres      = spr.List_3,
      Publishers  = spr.List_4,
      Series      = spr.List_5
   };
//-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
});

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HomeController
//**************************************************************************************************

} // BookRegistry.Server
