refactor: Trim down the response on the Workflows listing endpoint (#4726)

* fix: Avoid hashing workflows in the listing page

* stop returning full nodes data on the listings page when sharing is enabled

* fix the relations array for workflow listing

* add a comment explaining the hash skipping hack
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-25 14:20:28 +01:00
committed by GitHub
parent 39a5dc57a8
commit 1579d05fd1
4 changed files with 32 additions and 32 deletions

View File

@@ -101,6 +101,9 @@ export class WorkflowEntity extends AbstractEntity implements IWorkflowDb {
setHash(): void {
const { name, active, nodes, connections, settings, staticData, pinData } = this;
// Workflow listing page does not request the `connections` column, so we can use this for `undefined` to avoid generating hashes for all the workflows.
if (!connections) return;
const state = JSON.stringify({
name,
active,