Skip to content

Commit b285148

Browse files
committed
fix: scorecards to use
Signed-off-by: Rakib Ansary <rakibansary@gmail.com>
1 parent e459d3c commit b285148

File tree

3 files changed

+525
-1292
lines changed

3 files changed

+525
-1292
lines changed

src/domain/Challenge.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,15 +340,17 @@ class ChallengeDomain extends CoreOperations<Challenge, CreateChallengeInput> {
340340
await legacyPhaseDomain.updateProjectPhase({
341341
projectPhaseId: phase.projectPhaseId,
342342
phaseStatusId: newStatus,
343-
...(phaseOrder === 0 ? {
344-
fixedStartTime: moment(phase.fixedStartTime).format(
345-
"yyyy-MM-DD HH:mm:ss"
346-
)
347-
? moment(v5Equivalent.scheduledStartDate).format(
343+
...(phaseOrder === 0
344+
? {
345+
fixedStartTime: moment(phase.fixedStartTime).format(
348346
"yyyy-MM-DD HH:mm:ss"
349347
)
350-
: undefined,
351-
} : {}),
348+
? moment(v5Equivalent.scheduledStartDate).format(
349+
"yyyy-MM-DD HH:mm:ss"
350+
)
351+
: undefined,
352+
}
353+
: {}),
352354
scheduledStartTime: moment(
353355
v5Equivalent.scheduledStartDate
354356
).format("yyyy-MM-DD HH:mm:ss"),
@@ -962,7 +964,11 @@ class ChallengeDomain extends CoreOperations<Challenge, CreateChallengeInput> {
962964
const createdByUserId = 22838965; // TODO: Extract from interceptors
963965
const updatedByUserId = 22838965; // TODO: Extract from interceptors
964966

965-
if (!input?.legacyId && input?.status && input?.status !== ChallengeStatuses.New) {
967+
if (
968+
!input?.legacyId &&
969+
input?.status &&
970+
input?.status !== ChallengeStatuses.New
971+
) {
966972
console.log(`Legacy ID does not exist. Creating challenge in legacy...`);
967973
const { track, subTrack, isTask, technologies } =
968974
legacyMapper.mapTrackAndType(
@@ -1262,7 +1268,7 @@ class ChallengeDomain extends CoreOperations<Challenge, CreateChallengeInput> {
12621268
// "prizeSets"]) {
12631269
// _.set(input, key, JSON.stringify(_.get(input, key)))
12641270
// }
1265-
console.log('------ before save --------');
1271+
console.log("------ before save --------");
12661272

12671273
// console.log(input);
12681274
console.log(_.omit(input, ["id"]));

0 commit comments

Comments
 (0)