Able to retrieve single and multiple records (Album, Artist, Genre, Year)
This commit is contained in:
+12
-1
@@ -10,27 +10,38 @@
|
||||
#include "oatpp/web/server/HttpConnectionHandler.hpp"
|
||||
|
||||
#include "component/AppComponent.hpp"
|
||||
#include "controller/ArtistController.hpp"
|
||||
#include "controller/AlbumController.hpp"
|
||||
#include "controller/CoverArtController.hpp"
|
||||
#include "controller/GenreController.hpp"
|
||||
#include "controller/LoginController.hpp"
|
||||
#include "controller/SongController.hpp"
|
||||
#include "controller/YearController.hpp"
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
//void run(const std::string& working_path)
|
||||
void run(const model::BinaryPath& bConf)
|
||||
{
|
||||
component::AppComponent component;
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::web::server::HttpRouter>, router);
|
||||
|
||||
auto albumController = std::make_shared<controller::AlbumController>(bConf);
|
||||
auto artistController = std::make_shared<controller::ArtistController>(bConf);
|
||||
auto coverArtController = std::make_shared<controller::CoverArtController>(bConf);
|
||||
auto gnrController = std::make_shared<controller::GenreController>(bConf);
|
||||
auto logController = std::make_shared<controller::LoginController>(bConf);
|
||||
auto sngController = std::make_shared<controller::SongController>(bConf);
|
||||
auto yearController = std::make_shared<controller::YearController>(bConf);
|
||||
|
||||
albumController->addEndpointsToRouter(router);
|
||||
artistController->addEndpointsToRouter(router);
|
||||
coverArtController->addEndpointsToRouter(router);
|
||||
gnrController->addEndpointsToRouter(router);
|
||||
logController->addEndpointsToRouter(router);
|
||||
sngController->addEndpointsToRouter(router);
|
||||
yearController->addEndpointsToRouter(router);
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::server::ConnectionHandler>, connectionHandler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user