[web] Avoid double indexing of client side referencing (#28235)

* [web] Move chat client id to shared module

* [web] Avoid double indexing of client references

GitOrigin-RevId: 993930e66fdc9952649e3e8d345c70dd37516121
This commit is contained in:
Mathias Jakobsen
2025-09-08 08:05:14 +00:00
committed by Copybot
parent 644db1722e
commit 442c1952ab
7 changed files with 37 additions and 17 deletions
@@ -84,6 +84,7 @@ async function createLinkedFile(req, res, next) {
async function refreshLinkedFile(req, res, next) {
const { project_id: projectId, file_id: fileId } = req.params
const { clientId } = req.body
const userId = SessionManager.getLoggedInUserId(req.session)
const { file, parentFolder } = await LinkedFilesHandler.promises.getFileById(
@@ -138,7 +139,8 @@ async function refreshLinkedFile(req, res, next) {
projectId,
'references:keys:updated',
data.keys,
true
true,
clientId
)
res.json({ new_file_id: newFileId })
} else {