fix: missing trailing slash in path

This commit is contained in:
Methapon2001 2023-11-29 17:51:34 +07:00
parent a206886be5
commit 37d0b08b11
No known key found for this signature in database
GPG key ID: 849924FEF46BD132
4 changed files with 16 additions and 4 deletions

View file

@ -163,7 +163,10 @@ export class FolderController extends Controller {
await esClient.update({
index: DEFAULT_INDEX!,
id: data._id,
doc: { pathname: destination, path: destination.split("/").slice(0, -1).join("/") },
doc: {
pathname: destination,
path: destination.split("/").slice(0, -1).join("/") + "/",
},
refresh: "wait_for",
});