From 68c4a64785a538128ed9f6dc097a03e50d92bc55 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Tue, 10 Dec 2024 11:40:01 +0530 Subject: [PATCH] fix endpoints for offchain agent --- src/main.rs | 8 +++++++- src/qstash/mod.rs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index a67a054..67b1ce0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,9 @@ use axum::routing::post; use axum::{routing::get, Router}; use canister::mlfeed_cache::off_chain::off_chain_canister_server::OffChainCanisterServer; use canister::mlfeed_cache::OffChainCanisterService; -use canister::upgrade_user_token_sns_canister::upgrade_user_token_sns_canister_handler; +use canister::upgrade_user_token_sns_canister::{ + upgrade_user_token_sns_canister_for_entire_network, upgrade_user_token_sns_canister_handler, +}; use canister::upload_user_video::upload_user_video_handler; use config::AppConfig; use env_logger::{Builder, Target}; @@ -72,6 +74,10 @@ async fn main() -> Result<()> { "/upgrade_user_token_sns_canister/:individual_user_canister_id", post(upgrade_user_token_sns_canister_handler), ) + .route( + "/upgrade_user_token_sns_canister_for_entire_network", + post(upgrade_user_token_sns_canister_for_entire_network), + ) .route( "/get-snapshot", get(canister::snapshot::get_snapshot_canister), diff --git a/src/qstash/mod.rs b/src/qstash/mod.rs index f14be63..d8c3e41 100644 --- a/src/qstash/mod.rs +++ b/src/qstash/mod.rs @@ -454,7 +454,7 @@ pub fn qstash_router(app_state: Arc) -> Router { post(upgrade_all_sns_canisters_for_a_user_canister), ) .route( - "upgrade_user_token_sns_canister_for_entire_network", + "/upgrade_user_token_sns_canister_for_entire_network", post(upgrade_user_token_sns_canister_for_entire_network), ) .layer(ServiceBuilder::new().layer(middleware::from_fn_with_state(