mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #11708 from overleaf/bg-reinitialise-project-history
allow re-initialisation of history GitOrigin-RevId: 85caf506df736917f6870f68b3bfab46d57aa28e
This commit is contained in:
parent
98cf5765e9
commit
ef499680aa
1 changed files with 5 additions and 2 deletions
|
@ -919,9 +919,12 @@ async function buildUpdates(
|
|||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function deleteProjectHistory(projectId) {
|
||||
await HistoryManager.promises.deleteProjectHistory(projectId)
|
||||
// look up the history id from the project
|
||||
const historyId = await ProjectHistoryHandler.promises.getHistoryId(projectId)
|
||||
// delete the history from project-history and history-v1
|
||||
await HistoryManager.promises.deleteProject(projectId, historyId)
|
||||
// TODO: send a message to document-updater?
|
||||
await ProjectHistoryHandler.unsetHistory(projectId)
|
||||
await ProjectHistoryHandler.promises.unsetHistory(projectId)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue