MCPcopy
hub / github.com/automatisch/automatisch / find

Method find

packages/backend/src/models/flow.js:526–556  ·  view source on GitHub ↗
({ folderId, name, status, userId })

Source from the content-addressed store, hash-verified

524 }
525
526 static find({ folderId, name, status, userId }) {
527 return this.query()
528 .withGraphFetched({
529 steps: true,
530 })
531 .where((builder) => {
532 if (name) {
533 builder.where('flows.name', 'ilike', `%${name}%`);
534 }
535
536 if (status === 'published') {
537 builder.where('flows.active', true);
538 } else if (status === 'draft') {
539 builder.where('flows.active', false);
540 }
541
542 if (userId) {
543 builder.where('flows.user_id', userId);
544 }
545
546 if (folderId === 'null') {
547 builder.where((builder) => {
548 builder.whereNull('flows.folder_id');
549 });
550 } else if (folderId) {
551 builder.where('flows.folder_id', folderId);
552 }
553 })
554 .orderBy('active', 'desc')
555 .orderBy('updated_at', 'desc');
556 }
557
558 async assignExecutionInterval() {
559 if (this.executionInterval && this.executionInterval !== 15) {

Callers 15

getExecutionStepsMockFunction · 0.45
getUsersMockFunction · 0.45
getUsersMockFunction · 0.45
getUserInvitationsActionFunction · 0.45
get-flows.ee.jsFile · 0.45
getFieldByKeyFunction · 0.45
getVariableExecutionStepFunction · 0.45
computeArrayParameterFunction · 0.45
getPlanByIdFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected