mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-06 12:02:14 +00:00
implement digest checking for ReplicationConfig update
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
d09c076a62
commit
a4dc8611e6
@ -89,6 +89,8 @@ __PACKAGE__->register_method ({
|
||||
|
||||
$data->{id} = $param->{id};
|
||||
|
||||
$data->{digest} = $cfg->{digest};
|
||||
|
||||
return $data;
|
||||
}});
|
||||
|
||||
@ -157,10 +159,13 @@ __PACKAGE__->register_method ({
|
||||
my ($param) = @_;
|
||||
|
||||
my $id = extract_param($param, 'id');
|
||||
my $digest = extract_param($param, 'digest');
|
||||
|
||||
my $code = sub {
|
||||
my $cfg = PVE::ReplicationConfig->new();
|
||||
|
||||
PVE::SectionConfig::assert_if_modified($cfg, $digest);
|
||||
|
||||
my $data = $cfg->{ids}->{$id};
|
||||
die "no such job '$id'\n" if !$data;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user