[web] let docstore determine a projects comment thread ids (#26364)

* [docstore] add endpoint for getting a projects comment thread ids

* [web] let docstore determine a projects comment thread ids

Also fetch the comment thread ids once when reverting project.

GitOrigin-RevId: c3ebab976821509c9627962e58918f9c6ebb0e1d
This commit is contained in:
Jakob Ackermann
2025-06-13 08:08:00 +00:00
committed by Copybot
parent e95b159edd
commit f025f1d0cb
8 changed files with 278 additions and 42 deletions
@@ -83,6 +83,12 @@ async function getAllRanges(req, res) {
res.json(_buildDocsArrayView(projectId, docs))
}
async function getCommentThreadIds(req, res) {
const { project_id: projectId } = req.params
const threadIds = await DocManager.getCommentThreadIds(projectId)
res.json(threadIds)
}
async function getTrackedChangesUserIds(req, res) {
const { project_id: projectId } = req.params
const userIds = await DocManager.getTrackedChangesUserIds(projectId)
@@ -239,6 +245,7 @@ module.exports = {
getAllDeletedDocs: expressify(getAllDeletedDocs),
getAllRanges: expressify(getAllRanges),
getTrackedChangesUserIds: expressify(getTrackedChangesUserIds),
getCommentThreadIds: expressify(getCommentThreadIds),
projectHasRanges: expressify(projectHasRanges),
updateDoc: expressify(updateDoc),
patchDoc: expressify(patchDoc),