pub fn create_service_human(
form: Form<AddServiceForm>,
session: Option<AdminSession>,
pool: &State<DbPool>,
database_url: &State<DatabaseUrl>,
) -> Result<Redirect, Template>Expand description
Defines a new service and activates it on each checked corpus — one background activation
job per corpus (each creates a TODO task per imported document, so a large corpus can run for a
while; the operator tracks them on /jobs). Gated by the signed-in AdminSession cookie
(anonymous → sign-in). Redirects to /jobs when any corpus was selected (so the in-flight
registrations are immediately visible), else back to /services. 409 if the name already
exists.