global: snapshot

This commit is contained in:
nym21
2025-06-24 11:56:54 +02:00
parent b91120e8d4
commit c0cd4cba6f
8 changed files with 136 additions and 110 deletions

View File

@@ -1454,12 +1454,19 @@ function createUtils() {
* @param {number} [to]
*/
function genPath(index, vecId, from, to) {
let path = `/query?index=${serde.index.serialize(index)}&ids=${vecId}`;
let path = `/${serde.index.serialize(index)}-to-${vecId.replaceAll(
"_",
"-"
)}?`;
if (from !== undefined) {
path += `&from=${from}`;
path += `from=${from}`;
}
if (to !== undefined) {
path += `&to=${to}`;
if (!path.endsWith("?")) {
path += `&`;
}
path += `to=${to}`;
}
return path;
}