mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #24776 from overleaf/em-project-history-unused-endpoints
Remove unused endpoints in project-history GitOrigin-RevId: 2940c1c1973177e3200cb78884b307f708fd88c3
This commit is contained in:
@@ -238,22 +238,6 @@ export function getFileMetadataSnapshot(req, res, next) {
|
||||
)
|
||||
}
|
||||
|
||||
export function getMostRecentChunk(req, res, next) {
|
||||
const { project_id: projectId } = req.params
|
||||
WebApiManager.getHistoryId(projectId, (error, historyId) => {
|
||||
if (error) return next(OError.tag(error))
|
||||
|
||||
HistoryStoreManager.getMostRecentChunk(
|
||||
projectId,
|
||||
historyId,
|
||||
(err, data) => {
|
||||
if (err) return next(OError.tag(err))
|
||||
res.json(data)
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
export function getLatestSnapshot(req, res, next) {
|
||||
const { project_id: projectId } = req.params
|
||||
WebApiManager.getHistoryId(projectId, (error, historyId) => {
|
||||
@@ -272,25 +256,6 @@ export function getLatestSnapshot(req, res, next) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getChangesSince(req, res, next) {
|
||||
const { project_id: projectId } = req.params
|
||||
const { since } = req.query
|
||||
WebApiManager.getHistoryId(projectId, (error, historyId) => {
|
||||
if (error) return next(OError.tag(error))
|
||||
SnapshotManager.getChangesSince(
|
||||
projectId,
|
||||
historyId,
|
||||
since,
|
||||
(error, changes) => {
|
||||
if (error != null) {
|
||||
return next(error)
|
||||
}
|
||||
res.json(changes.map(c => c.toRaw()))
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
export function getChangesInChunkSince(req, res, next) {
|
||||
const { project_id: projectId } = req.params
|
||||
const { since } = req.query
|
||||
|
||||
Reference in New Issue
Block a user