pub async fn index_handler(
__arg0: State<AppState>,
__arg1: Json<IndexRequest>,
) -> Result<Json<IndexResponse>, StatusCode>
Expand description
HTTP handler for domain indexing operations.
Queues one or more domains for crawling and indexing. The indexing process runs asynchronously in the background.
§Request Body
JSON object containing an array of domain names:
{
"domains": ["example.com", "another-site.org"]
}
§Returns
200 OK
: JSON response confirming domains were queued500 Internal Server Error
: If queueing operation fails
§Example
POST /index
Content-Type: application/json
{"domains": ["example.com"]}