@@ -79,16 +79,16 @@ interface ProjectNotificationsRulePointer {
7979/**
8080 * Returns true is threshold and threshold period are valid
8181 * @param threshold - threshold of the notification rule to be checked
82- * @param thresholdPeriod - threshold period of the notification rule to be checked
82+ * @param thresholdPeriod - threshold period of the notification rule to be checked
8383 */
8484function validateNotificationsRuleTresholdAndPeriod (
85- threshold : ProjectNotificationsRuleDBScheme [ 'threshold' ] ,
85+ threshold : ProjectNotificationsRuleDBScheme [ 'threshold' ] ,
8686 thresholdPeriod : ProjectNotificationsRuleDBScheme [ 'thresholdPeriod' ]
8787) : string | null {
88- const validThresholdPeriods = [ 60_000 , 3_600_000 , 86_400_000 , 604_800_000 ]
88+ const validThresholdPeriods = [ 60_000 , 3_600_000 , 86_400_000 , 604_800_000 ] ;
8989
9090 if ( thresholdPeriod === undefined || ! validThresholdPeriods . includes ( thresholdPeriod ) ) {
91- return 'Threshold period should be one of the following: 60000, 3600000, 86400000, 604800000' ;
91+ return 'Threshold period should be one of the following: 60000, 3600000, 86400000, 604800000' ;
9292 }
9393
9494 if ( threshold === undefined || threshold < 1 ) {
@@ -98,7 +98,6 @@ function validateNotificationsRuleTresholdAndPeriod(
9898 return null ;
9999}
100100
101-
102101/**
103102 * Return true if all passed channels are filled with correct endpoints
104103 */
@@ -160,7 +159,7 @@ export default {
160159 throw new UserInputError ( thresholdValidationResult ) ;
161160 }
162161 }
163-
162+
164163 return project . createNotificationsRule ( {
165164 ...input ,
166165 uidAdded : user . id ,
@@ -184,7 +183,7 @@ export default {
184183 if ( ! project ) {
185184 throw new ApolloError ( 'No project with such id' ) ;
186185 }
187-
186+
188187 const channelsValidationResult = validateNotificationsRuleChannels ( input . channels ) ;
189188
190189 if ( channelsValidationResult !== null ) {
0 commit comments