Vcs更新実装 WIP

This commit is contained in:
r-ca 2024-01-29 05:29:13 +09:00
parent 1e046e7b9e
commit 426a3534c8
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -41,7 +41,20 @@ public class LacertaVcsImpl implements LacertaVcs {
@Override
public void updatePage(int index, String fileName) {
logger.debug(TAG, "updatePage");
// UpdatePage
UpdatePage updatePage = new UpdatePage(index, fileName);
updatePage.setActionType(ActionType.UPDATE_PAGE);
VcsLogEntity vcsLogEntity = new VcsLogEntity();
vcsLogEntity.id = UUID.randomUUID().toString();
vcsLogEntity.documentId = documentId;
vcsLogEntity.branchName = "master";
vcsLogEntity.createdAt = new java.util.Date();
vcsLogEntity.actionType = ActionType.UPDATE_PAGE.getValue();
vcsLogEntity.action = JsonUtils.toJson(updatePage);
database.vcsLogDao().insert(vcsLogEntity);
}
@Override