Add ability to turn off and delete backups.

This commit is contained in:
Alex Hart
2024-06-18 12:43:47 -03:00
committed by Greyson Parrelli
parent 6659700a1c
commit 5ecf60a306
20 changed files with 239 additions and 152 deletions

View File

@@ -84,6 +84,18 @@ public final class ServiceResponse<Result> {
}
}
public Result getResultOrThrow() throws Throwable {
if (result.isPresent()) {
return result.get();
} else if (applicationError.isPresent()) {
throw applicationError.get();
} else if (executionError.isPresent()) {
throw executionError.get();
} else {
throw new AssertionError("Should never get here");
}
}
public static <T> ServiceResponse<T> forResult(T result, WebsocketResponse response) {
return new ServiceResponse<>(result, response);
}