Skip to main content

update_plugin

Function update_plugin 

Source
pub async fn update_plugin(
    state: Data<AppState>,
    path: Path<String>,
    body: Json<InstallPluginRequest>,
) -> impl Responder
Expand description

POST /api/v1/plugins/{id}/updateInstallDisposition::Upgrade.

Unlike install, this route’s URL names the target id up front, so — before handing off to the installer — the staged source’s OWN manifest id (the id install() will actually key the upgrade by) is checked against the path segment. A mismatch is refused as a 400 rather than silently upgrading whatever id the body’s source happens to declare, which would otherwise be README-legible but genuinely confusing (a request the URL promises operates on foo silently upgrading bar).