Skip to content

Commit

Permalink
fix BackupMetadata::fromJson being incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
HJfod committed Nov 16, 2024
1 parent 46b4f6b commit 69ba033
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/features/backups/Backup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ struct matjson::Serialize<BackupMetadata> {
static Result<BackupMetadata> fromJson(matjson::Value const& value) {
auto meta = BackupMetadata();
auto obj = checkJson(value, "BackupMetadata");

int createTime;
obj.needs("create-time").into(createTime);
meta.createTime = Backup::TimePoint(Backup::TimeUnit(createTime));
obj.has("automated").into(meta.automated);

return Ok(meta);
return obj.ok(meta);
}
};

Expand Down

0 comments on commit 69ba033

Please sign in to comment.