Rindle docs and package mapSkip to main content

shape_deploy_migrations

Function shape_deploy_migrations 

pub fn shape_deploy_migrations(
    body: &Value,
) -> Result<(Vec<DeployMigrationRequest>, bool), String>
Expand description

Shape the private /migrate body into its migrations plus whether the caller used the batch form.

The ARRAY form is the batch rindle migrate apply posts; anything else is the single form. The distinction is wire-visible in two ways the hosts rely on, so it is returned rather than inferred from the vector’s length: the two forms answer in different response shapes, and they report the same field error with different wording. An empty array is a batch of zero, never a single migration.

Err is the plain message both hosts render as a 400.