pub async fn check_admin_exists(
__arg0: State<Arc<AppState>>,
) -> Result<impl IntoResponse, (StatusCode, Json<Value>)>Expand description
Checks if any administrator user exists in the system.
This endpoint is used during initialization to determine if the setup page should be displayed.
It counts all User records with is_admin = true in the database.
§Arguments
State(data): Application state containingAppStatefor database access
§Returns
200 OKwith JSON:{"has_admin": bool}- Whether at least one admin exists500 Internal Server Errorif database query fails
§Example Response
{"has_admin": false}