mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[Web + Doc-Updater] Add track changes accepted notification (#32752)
* feat: update doc manager to return a list of contributors to the accepted change * feat: add new notification type for accepting a tracked change * update email with tracked changes accepted * feat: update tests * fix: feedback on consistent api and returns * feat: adding new tests * feat: self accepted changes shouldnt trigger notification, and using existing changesAccepted hook * Add better subject and activity list for track change accepted (#33094) * feat: add better activity list entry and subject header for accepted changes, to match other notifications * feat: updating tests * feat: updating accepting_user_id to just user_id * fix: adding users in emailBuilder test to userCache GitOrigin-RevId: 6114f77916b5f503b7bbbb5ca8fed99e58edc31b
This commit is contained in:
committed by
Copybot
parent
fe59b9cdb5
commit
994932b8e3
@@ -355,17 +355,19 @@ async function acceptChanges(req, res) {
|
||||
`accepting ${changeIds.length} changes via http`
|
||||
)
|
||||
const timer = new Metrics.Timer('http.acceptChanges')
|
||||
await DocumentManager.promises.acceptChangesWithLock(
|
||||
projectId,
|
||||
docId,
|
||||
changeIds
|
||||
)
|
||||
const changeContributors =
|
||||
await DocumentManager.promises.acceptChangesWithLock(
|
||||
projectId,
|
||||
docId,
|
||||
changeIds
|
||||
)
|
||||
timer.done()
|
||||
logger.debug(
|
||||
{ projectId, docId },
|
||||
`accepted ${changeIds.length} changes via http`
|
||||
)
|
||||
res.sendStatus(204) // No Content
|
||||
|
||||
res.status(200).json({ changeContributors })
|
||||
}
|
||||
|
||||
async function rejectChanges(req, res) {
|
||||
|
||||
Reference in New Issue
Block a user