■ ■ ■ ■ ■ ■
opencti-platform/opencti-graphql/src/utils/indicator-utils.ts
| skipped 74 lines |
75 | 75 | | return DEFAULT_INDICATOR_TTL; |
76 | 76 | | }; |
77 | 77 | | |
78 | | - | const computeValidFrom = (context: AuthContext, user: AuthUser, indicator: IndicatorAddInput): Moment => { |
| 78 | + | const computeValidFrom = (indicator: IndicatorAddInput): Moment => { |
79 | 79 | | if (isNotEmptyField(indicator.valid_from)) { |
80 | 80 | | return utcDate(indicator.valid_from); |
81 | 81 | | } |
| skipped 12 lines |
94 | 94 | | }; |
95 | 95 | | |
96 | 96 | | export const computeValidPeriod = async (context: AuthContext, user: AuthUser, indicator: IndicatorAddInput) => { |
97 | | - | const validFrom = computeValidFrom(context, user, indicator); |
| 97 | + | const validFrom = computeValidFrom(indicator); |
98 | 98 | | const validUntil = await computeValidUntil(context, user, indicator, validFrom); |
99 | 99 | | return { validFrom: validFrom.toISOString(), validUntil: validUntil.toISOString() }; |
100 | 100 | | }; |
| skipped 1 lines |