mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
Saving pushed version ID to db.
This commit is contained in:
parent
0ac263ad45
commit
044f67ea49
3 changed files with 4 additions and 2 deletions
|
@ -39,7 +39,6 @@ public class AttsResourceHandler extends ResourceHandler {
|
|||
} catch (InvalidPostbackKeyException e) {
|
||||
throw new ServletException();
|
||||
}
|
||||
System.out.println(multimap);
|
||||
|
||||
if (false) {
|
||||
throw new ServletException();
|
||||
|
|
|
@ -37,7 +37,7 @@ public class PostbackManager {
|
|||
}
|
||||
|
||||
private PostbackContents getPostbackForProject(String projectName) throws UnexpectedPostbackException {
|
||||
PostbackContents contents = postbackContentsTable.get(projectName);
|
||||
PostbackContents contents = postbackContentsTable.remove(projectName);
|
||||
if (contents == null) {
|
||||
throw new UnexpectedPostbackException();
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public class WLProject implements PersistentStoreSource {
|
|||
private final SnapshotFetcher snapshotFetcher;
|
||||
|
||||
private int latestSnapshotID;
|
||||
private PersistentStoreAPI persistentStore;
|
||||
|
||||
public WLProject(String name) {
|
||||
this.name = name;
|
||||
|
@ -60,10 +61,12 @@ public class WLProject implements PersistentStoreSource {
|
|||
snapshots.put(versionID, new Snapshot(versionID));
|
||||
snapshotFetcher.putLatestVersion(versionID);
|
||||
latestSnapshotID = versionID;
|
||||
persistentStore.addSnapshot(name, versionID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initFromPersistentStore(PersistentStoreAPI persistentStore) {
|
||||
this.persistentStore = persistentStore;
|
||||
snapshotFetcher.initFromPersistentStore(persistentStore);
|
||||
updateLatestSnapshot();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue