Default to 0 `usedBytes` in `GET /v1/archives`
This commit is contained in:
parent
d7f14339fe
commit
37aa3b8e49
|
@ -311,9 +311,8 @@ public class ArchiveController {
|
|||
@Schema(description = "The name of the most recent message backup on the cdn. The backup is at /backupDir/backupName")
|
||||
String backupName,
|
||||
|
||||
@Nullable
|
||||
@Schema(description = "The amount of space used to store media")
|
||||
Long usedSpace) {}
|
||||
long usedSpace) {}
|
||||
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
@ -345,7 +344,7 @@ public class ArchiveController {
|
|||
backupInfo.backupSubdir(),
|
||||
backupInfo.mediaSubdir(),
|
||||
backupInfo.messageBackupKey(),
|
||||
backupInfo.mediaUsedSpace().orElse(null)));
|
||||
backupInfo.mediaUsedSpace().orElse(0L)));
|
||||
}
|
||||
|
||||
public record SetPublicKeyRequest(
|
||||
|
|
|
@ -337,7 +337,7 @@ public class ArchiveControllerTest {
|
|||
assertThat(response.backupDir()).isEqualTo("myBackupDir");
|
||||
assertThat(response.backupName()).isEqualTo("filename");
|
||||
assertThat(response.cdn()).isEqualTo(1);
|
||||
assertThat(response.usedSpace()).isNull();
|
||||
assertThat(response.usedSpace()).isEqualTo(0L);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue