Skip to content

Commit

Permalink
Plugged ping to controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Nov 11, 2024
1 parent f2cab37 commit 1121bde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/http/controllers/api/is_alive_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ use super::models::IsAliveResponse;
{status_code: 200, description: "Monitoring result", model: "IsAliveResponse"},
]
)]
pub struct IsAliveAction {}

impl IsAliveAction {
pub fn new() -> Self {
Self {}
}
}
pub struct IsAliveAction;

async fn handle_request(
_: &IsAliveAction,
Expand Down
4 changes: 2 additions & 2 deletions src/http/controllers/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::app::AppContext;
pub fn build(app: &Arc<AppContext>) -> ControllersMiddleware {
let mut result = ControllersMiddleware::new(None, None);

let api_controller = super::api::IsAliveAction::new();
result.register_get_action(Arc::new(api_controller));
result.register_get_action(Arc::new(super::api::IsAliveAction));
result.register_get_action(Arc::new(super::api::PingAction));

result.register_get_action(Arc::new(super::tables_controller::GetListAction::new(
app.clone(),
Expand Down

0 comments on commit 1121bde

Please sign in to comment.