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#[derive(Deserialize)]
12pub struct NotifyOfUpdateParams {
13 pub hostname: String,
14}
15pub async fn notify_of_update(
16 State(_state): State<AppState>,
17 Query(params): Query<NotifyOfUpdateParams>,
18) -> Response {
19 info!("Received notifyOfUpdate from hostname: {}", params.hostname);
20 (StatusCode::OK, Json(json!({}))).into_response()
21}
22#[derive(Deserialize)]
23pub struct RequestCrawlInput {
24 pub hostname: String,
25}
26pub async fn request_crawl(
27 State(_state): State<AppState>,
28 Json(input): Json<RequestCrawlInput>,
29) -> Response {
30 info!("Received requestCrawl for hostname: {}", input.hostname);
31 (StatusCode::OK, Json(json!({}))).into_response()
32}