diff --git a/vcs/src/main/java/one/nem/lacerta/vcs/LacertaVcs.java b/vcs/src/main/java/one/nem/lacerta/vcs/LacertaVcs.java index 5392e9b2..cccc44ac 100644 --- a/vcs/src/main/java/one/nem/lacerta/vcs/LacertaVcs.java +++ b/vcs/src/main/java/one/nem/lacerta/vcs/LacertaVcs.java @@ -16,6 +16,8 @@ public interface LacertaVcs { public void deletePage(int index); + public void undo(); + public void createDocument(String documentId); public void generateRevisionAtCurrent(String message); diff --git a/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java b/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java index e81ffa7d..5e193bcd 100644 --- a/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java +++ b/vcs/src/main/java/one/nem/lacerta/vcs/impl/LacertaVcsImpl.java @@ -67,6 +67,11 @@ public class LacertaVcsImpl implements LacertaVcs { } + @Override + public void undo() { + database.vcsLogDao().deleteLatestByDocumentId(documentId); + } + @Override public void createDocument(String documentId) { logger.debug(TAG, "createDocument");