mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 06:39:01 +02:00
Saving pushed version ID to db.
This commit is contained in:
@@ -39,7 +39,6 @@ public class AttsResourceHandler extends ResourceHandler {
|
||||
} catch (InvalidPostbackKeyException e) {
|
||||
throw new ServletException();
|
||||
}
|
||||
System.out.println(multimap);
|
||||
|
||||
if (false) {
|
||||
throw new ServletException();
|
||||
|
||||
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user