Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Fixes for static-resources not updating in file-browser #9497

Merged
merged 3 commits into from
Dec 26, 2023

Conversation

MoizAdnan
Copy link
Member

  • Fixes static-resource table not removing entries of file which are inside a folder that is deleted
  • Fixes static-resource table not updating paths of file which are inside a folder that is renamed or moved

@MoizAdnan MoizAdnan marked this pull request as ready for review December 25, 2023 04:16
@hanzlamateen hanzlamateen added this pull request to the merge queue Dec 26, 2023
Merged via the queue into dev with commit c046ad8 Dec 26, 2023
11 of 12 checks passed
@hanzlamateen hanzlamateen deleted the file-browser-fixes branch December 26, 2023 04:34
if (staticResource?.data?.length > 0) await this.app.service(staticResourcePath).remove(staticResource?.data[0]?.id)
if (staticResources?.length > 0) {
for (const resource of staticResources) {
await this.app.service(staticResourcePath).remove(resource.id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do this in parallel

if (staticResources?.length > 0) {
for (const resource of staticResources) {
const newKey = resource.key.replace(path.join(_oldPath, data.oldName), path.join(_newPath, fileName))
await this.app.service(staticResourcePath).patch(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should do this in parallel

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants