mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
* Make Operation.fromRaw parse AddComment operations * Send operations to project-history when deleting comments * remove RedisManager.updateDocument call * format fix * Revert "remove RedisManager.updateDocument call" This reverts commit 5d45f34b5919bf5a85e8475e5a450bcb213d3f82. * remove versions from deleteComment op * pass userId to deleteComment operation * revert userId from chat service * revert userid from chat tests * format:fix * document updater fix tests * format:fix * fix web unit test * deleteThread test fix * send only if historyRangesSupport is true * use headers to pass userId * set historyRangesSupport in tests * optional headers * Revert "use headers to pass userId" This reverts commit e916c469f95b1ac166e30e12e735171eb814af01. --------- Co-authored-by: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> GitOrigin-RevId: 14c10669e43d76883dbaaa8ab55e102b5ebadd38
This commit is contained in:
committed by
Copybot
co-authored by
Eric Mc Sween
parent
51994579cd
commit
3e701f1388
@@ -307,16 +307,23 @@ function deleteComment(req, res, next) {
|
||||
doc_id: docId,
|
||||
comment_id: commentId,
|
||||
} = req.params
|
||||
const userId = req.body.user_id
|
||||
logger.debug({ projectId, docId, commentId }, 'deleting comment via http')
|
||||
const timer = new Metrics.Timer('http.deleteComment')
|
||||
DocumentManager.deleteCommentWithLock(projectId, docId, commentId, error => {
|
||||
timer.done()
|
||||
if (error) {
|
||||
return next(error)
|
||||
DocumentManager.deleteCommentWithLock(
|
||||
projectId,
|
||||
docId,
|
||||
commentId,
|
||||
userId,
|
||||
error => {
|
||||
timer.done()
|
||||
if (error) {
|
||||
return next(error)
|
||||
}
|
||||
logger.debug({ projectId, docId, commentId }, 'deleted comment via http')
|
||||
res.sendStatus(204) // No Content
|
||||
}
|
||||
logger.debug({ projectId, docId, commentId }, 'deleted comment via http')
|
||||
res.sendStatus(204) // No Content
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
function updateProject(req, res, next) {
|
||||
|
||||
Reference in New Issue
Block a user