mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 19:51:12 +00:00
More closely match the semantics of projectExists
This commit is contained in:
parent
f852cd603d
commit
dd2e9b6945
1 changed files with 8 additions and 3 deletions
|
@ -48,9 +48,14 @@ public class SnapshotApiFacade {
|
||||||
Optional<Credential> oauth2,
|
Optional<Credential> oauth2,
|
||||||
String projectName
|
String projectName
|
||||||
) throws FailedConnectionException, GitUserException {
|
) throws FailedConnectionException, GitUserException {
|
||||||
|
try {
|
||||||
GetDocResult doc = SnapshotApi
|
GetDocResult doc = SnapshotApi
|
||||||
.getResult(api.getDoc(oauth2, projectName));
|
.getResult(api.getDoc(oauth2, projectName));
|
||||||
return Optional.ofNullable(doc);
|
doc.getVersionID();
|
||||||
|
return Optional.of(doc);
|
||||||
|
} catch (InvalidProjectException e) {
|
||||||
|
return Optional.empty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Deque<Snapshot> getSnapshots(
|
public Deque<Snapshot> getSnapshots(
|
||||||
|
|
Loading…
Reference in a new issue