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