mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
More closely match the semantics of projectExists
This commit is contained in:
@@ -48,9 +48,14 @@ public class SnapshotApiFacade {
|
||||
Optional<Credential> oauth2,
|
||||
String projectName
|
||||
) throws FailedConnectionException, GitUserException {
|
||||
GetDocResult doc = SnapshotApi
|
||||
.getResult(api.getDoc(oauth2, projectName));
|
||||
return Optional.ofNullable(doc);
|
||||
try {
|
||||
GetDocResult doc = SnapshotApi
|
||||
.getResult(api.getDoc(oauth2, projectName));
|
||||
doc.getVersionID();
|
||||
return Optional.of(doc);
|
||||
} catch (InvalidProjectException e) {
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
public Deque<Snapshot> getSnapshots(
|
||||
|
||||
Reference in New Issue
Block a user