Add company management module with registration and entity switching
This commit is contained in:
@@ -10,6 +10,7 @@ use crate::controllers::contract::ContractController;
|
||||
use crate::controllers::asset::AssetController;
|
||||
use crate::controllers::marketplace::MarketplaceController;
|
||||
use crate::controllers::defi::DefiController;
|
||||
use crate::controllers::company::CompanyController;
|
||||
use crate::middleware::JwtAuth;
|
||||
use crate::SESSION_KEY;
|
||||
|
||||
@@ -133,6 +134,14 @@ pub fn configure_routes(cfg: &mut web::ServiceConfig) {
|
||||
.route("/swap", web::post().to(DefiController::swap_tokens))
|
||||
.route("/collateral", web::post().to(DefiController::create_collateral))
|
||||
)
|
||||
// Company routes
|
||||
.service(
|
||||
web::scope("/company")
|
||||
.route("", web::get().to(CompanyController::index))
|
||||
.route("/register", web::post().to(CompanyController::register))
|
||||
.route("/view/{id}", web::get().to(CompanyController::view_company))
|
||||
.route("/switch/{id}", web::get().to(CompanyController::switch_entity))
|
||||
)
|
||||
);
|
||||
|
||||
// Keep the /protected scope for any future routes that should be under that path
|
||||
|
Reference in New Issue
Block a user