@@ -22,15 +22,22 @@ public class Firmware {
|
||||
|
||||
private String eTag;
|
||||
|
||||
private int flashSize;
|
||||
|
||||
private String espIdf;
|
||||
|
||||
private String compiled;
|
||||
|
||||
private OffsetDateTime lastModified;
|
||||
|
||||
private FirmwareMeta meta;
|
||||
|
||||
public String getVersion() {
|
||||
return String.format("%d.%d.%d", major, minor, patch);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public static class FirmwareMeta {
|
||||
|
||||
private int flashSize;
|
||||
|
||||
private String espIdf;
|
||||
|
||||
private String compiled;
|
||||
}
|
||||
}
|
||||
|
@@ -48,9 +48,9 @@ public class StorageServiceImpl implements StorageService {
|
||||
int major = Integer.parseInt(version[0]);
|
||||
int minor = Integer.parseInt(version[1]);
|
||||
int patch = Integer.parseInt(version[2]);
|
||||
val meta = new Firmware.FirmwareMeta(flashSize, espIdf, compiled);
|
||||
result.add(
|
||||
new Firmware(major, minor, patch, "/files/" + major + "." + minor + "." + patch + "/firmware.bin",
|
||||
file.getEtag(), flashSize, espIdf, compiled, file.getUpdateTimeOffsetDateTime()));
|
||||
new Firmware(major, minor, patch, "/files/" + major + "." + minor + "." + patch + "/firmware.bin", file.getEtag(), file.getUpdateTimeOffsetDateTime(), meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user