File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -34,21 +34,21 @@ function processAction(msg, cfg) {
34
34
35
35
const instance = new ApiClient ( cfg ) ;
36
36
37
- console . log ( cfg ) ;
38
-
39
37
function createEvent ( postRequestBody ) {
40
38
console . log ( 'Creating Event with properties:' ) ;
41
- console . log ( postRequestBody ) ;
39
+ console . log ( JSON . stringify ( postRequestBody , null , 2 ) ) ;
42
40
return instance . post ( apiCall , postRequestBody ) ;
43
41
}
44
42
45
43
function emitData ( data ) {
46
- console . log ( 'Emitting data ...' ) ;
47
- let messageBody = {
48
- id : data . id ,
49
- calendarId : cfg . calendarId
50
- } ;
51
- self . emit ( 'data' , messages . newMessageWithBody ( messageBody ) ) ;
44
+ const id = data . id ;
45
+ console . log ( 'Successfully created event with ID=' , id ) ;
46
+ let messageBody = {
47
+ id,
48
+ calendarId : cfg . calendarId
49
+ } ;
50
+ console . log ( 'Emitting data ...' ) ;
51
+ self . emit ( 'data' , messages . newMessageWithBody ( messageBody ) ) ;
52
52
}
53
53
54
54
function emitError ( e ) {
You can’t perform that action at this time.
0 commit comments