MCPcopy Create free account
hub / github.com/dfinity/orbit / trigger_restore

Function trigger_restore

core/upgrader/impl/src/lib.rs:177–191  ·  view source on GitHub ↗
(params: upgrader_api::RestoreParams)

Source from the content-addressed store, hash-verified

175
176#[update]
177async fn trigger_restore(params: upgrader_api::RestoreParams) -> Result<(), TriggerRestoreError> {
178 let input: RestoreParams = RestoreParams {
179 snapshot_id: params.snapshot_id,
180 };
181 UPGRADER
182 .upgrade(ChangeParams::Restore(input))
183 .await
184 .map_err(|err| match err {
185 UpgradeError::NotController => TriggerRestoreError::NotController,
186 UpgradeError::Unauthorized => TriggerRestoreError::Unauthorized,
187 UpgradeError::UnexpectedError(err) => {
188 TriggerRestoreError::UnexpectedError(err.to_string())
189 }
190 })
191}
192
193#[update]
194async fn set_max_backup_snapshots(max_backup_snapshots: u64) -> Result<(), String> {

Callers

nothing calls this directly

Calls 1

upgradeMethod · 0.80

Tested by

no test coverage detected