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

Commit

Permalink
fix(yt:backend): return 'steps' when creating experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
ascariandrea committed Nov 14, 2022
1 parent 4c13157 commit 732206d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions platforms/yttrex/backend/lib/automo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import { CreatorStatContent, CreatorStats } from '@shared/models/CreatorStats';
import { GetDirectiveOutput } from '@shared/models/Experiment';
import { Step } from '@shared/models/Step';
import * as mongo3 from '@shared/providers/mongo.provider';
import { ParsedInfo, VideoMetadata } from '@yttrex/shared/models/metadata/Metadata';
import {
ParsedInfo,
VideoMetadata,
} from '@yttrex/shared/models/metadata/Metadata';
import { NatureType } from '@yttrex/shared/models/Nature';
import { Supporter } from '@yttrex/shared/models/Supporter';
import { differenceInSeconds, formatDistance } from 'date-fns';
Expand Down Expand Up @@ -918,6 +921,7 @@ async function registerSteps(steps: Step[]): Promise<any> {
status: 'exist',
experimentId: exist.experimentId,
since: exist.when,
steps: [],
};
}

Expand All @@ -929,7 +933,7 @@ async function registerSteps(steps: Step[]): Promise<any> {
});
await mongoc.close();
debug('Registered directive %s', experimentId);
return { status: 'created', experimentId, since: new Date() };
return { status: 'created', experimentId, since: new Date(), steps };
}

async function pickDirective(
Expand Down

0 comments on commit 732206d

Please sign in to comment.