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