Pieter
09/07/2017, 5:07 PMagartha
09/07/2017, 5:14 PMPieter
09/07/2017, 5:14 PMPieter
09/07/2017, 5:14 PMagartha
09/07/2017, 5:14 PMagartha
09/07/2017, 5:14 PMmlyons
09/07/2017, 5:14 PMagartha
09/07/2017, 5:15 PMPieter
09/07/2017, 5:15 PMPieter
09/07/2017, 5:15 PMPieter
09/07/2017, 5:15 PMagartha
09/07/2017, 5:15 PMagartha
09/07/2017, 5:15 PMagartha
09/07/2017, 5:16 PMTRANSFORM_ARGUMENT
-> uniqueId = cuid() -> savePieter
09/07/2017, 5:16 PMagartha
09/07/2017, 5:17 PMPieter
09/07/2017, 5:17 PMPieter
09/07/2017, 5:17 PMagartha
09/07/2017, 5:18 PMPieter
09/07/2017, 5:18 PMPieter
09/07/2017, 5:18 PMagartha
09/07/2017, 5:19 PMPieter
09/07/2017, 5:20 PMmodule.exports = function (event) {
var cuid = require('cuid');
event.data.bookingNumber = cuid();
return {data: event.data};
}
Pieter
09/07/2017, 5:20 PMagartha
09/07/2017, 5:20 PMPieter
09/07/2017, 5:21 PMagartha
09/07/2017, 5:21 PMagartha
09/07/2017, 5:21 PMagartha
09/07/2017, 5:21 PMPieter
09/07/2017, 5:21 PMagartha
09/07/2017, 5:21 PMPieter
09/07/2017, 5:21 PMPieter
09/07/2017, 5:24 PMPieter
09/07/2017, 5:24 PMPieter
09/07/2017, 5:24 PMPieter
09/07/2017, 5:25 PMPieter
09/07/2017, 5:25 PMagartha
09/07/2017, 5:25 PMagartha
09/07/2017, 5:26 PMagartha
09/07/2017, 5:27 PMagartha
09/07/2017, 5:27 PMmlyons
09/07/2017, 5:27 PMagartha
09/07/2017, 5:34 PMmlyons
09/07/2017, 5:39 PMnilan
09/07/2017, 11:56 PMPieter
09/08/2017, 7:11 AMPieter
09/08/2017, 7:14 AMallBookings
and filtering using last: 1
and then checking what that one's bookingNumber is, then I parse the int (after removing the user's name) and increment it. If there are no bookings in yet (new deployment) I just set it to 1.
Then I take that number and add the expert name at the end and add it to event.data
and return {data: event.data}
Pieter
09/08/2017, 7:15 AMtransform argument
, they will run in a linear fashion. Or is it completely async?Pieter
09/08/2017, 7:16 AMPieter
09/08/2017, 8:16 AM