this repo has no description
1use crate::state::AppState; 2use axum::{ 3 Json, 4 extract::{Query, State}, 5 http::StatusCode, 6 response::{IntoResponse, Response}, 7}; 8use serde::Deserialize; 9use serde_json::json; 10use tracing::info; 11 12#[derive(Deserialize)] 13pub struct NotifyOfUpdateParams { 14 pub hostname: String, 15} 16 17pub async fn notify_of_update( 18 State(_state): State<AppState>, 19 Query(params): Query<NotifyOfUpdateParams>, 20) -> Response { 21 info!("Received notifyOfUpdate from hostname: {}", params.hostname); 22 (StatusCode::OK, Json(json!({}))).into_response() 23} 24 25#[derive(Deserialize)] 26pub struct RequestCrawlInput { 27 pub hostname: String, 28} 29 30pub async fn request_crawl( 31 State(_state): State<AppState>, 32 Json(input): Json<RequestCrawlInput>, 33) -> Response { 34 info!("Received requestCrawl for hostname: {}", input.hostname); 35 (StatusCode::OK, Json(json!({}))).into_response() 36}