Commit a750aa69 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Get API version for NsmfEventExposure

parent c77a9a40
......@@ -12,6 +12,9 @@
#include "IndividualSubscriptionDocumentApi.h"
#include "Helpers.h"
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai {
namespace smf_server {
......@@ -31,9 +34,9 @@ void IndividualSubscriptionDocumentApi::init() {
void IndividualSubscriptionDocumentApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Delete(*router, base + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::delete_individual_subcription_handler, this));
Routes::Get(*router, base + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::get_individual_subcription_handler, this));
Routes::Put(*router, base + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::replace_individual_subcription_handler, this));
Routes::Delete(*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::delete_individual_subcription_handler, this));
Routes::Get(*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::get_individual_subcription_handler, this));
Routes::Put(*router, base + smf_cfg.sbi_api_version + "/subscriptions/:subId", Routes::bind(&IndividualSubscriptionDocumentApi::replace_individual_subcription_handler, this));
// Default handler, called when a route is not found
router->addCustomHandler(Routes::bind(&IndividualSubscriptionDocumentApi::individual_subscription_document_api_default_handler, this));
......
......@@ -41,7 +41,7 @@ public:
virtual ~IndividualSubscriptionDocumentApi() {}
void init();
const std::string base = "/nsmf_event-exposure/v1";
const std::string base = "/nsmf_event-exposure/";
private:
void setupRoutes();
......
......@@ -12,6 +12,9 @@
#include "SubscriptionsCollectionApi.h"
#include "Helpers.h"
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai {
namespace smf_server {
......@@ -31,7 +34,7 @@ void SubscriptionsCollectionApi::init() {
void SubscriptionsCollectionApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Post(*router, base + "/subscriptions", Routes::bind(&SubscriptionsCollectionApi::create_individual_subcription_handler, this));
Routes::Post(*router, base + smf_cfg.sbi_api_version + "/subscriptions", Routes::bind(&SubscriptionsCollectionApi::create_individual_subcription_handler, this));
// Default handler, called when a route is not found
router->addCustomHandler(Routes::bind(&SubscriptionsCollectionApi::subscriptions_collection_api_default_handler, this));
......
......@@ -40,7 +40,7 @@ public:
virtual ~SubscriptionsCollectionApi() {}
void init();
const std::string base = "/nsmf_event-exposure/v1";
const std::string base = "/nsmf_event-exposure/";
private:
void setupRoutes();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment