onUserCreate, onUserUpdate

This summer it was revelaed that the events onUserCreate, onUserUpdate & onUserDelete serverless events would be available.

Have now done an app that works when I trigger the events.

However, when installed, nothing happens.

manifest.json

  "events": {
    "onUserCreate": {
      "handler": "onUserCreateHandler"
    },
    "onUserUpdate": {
      "handler": "onUserUpdateHandler"
    }

server.js

exports = {
onUserCreateHandler: async function (args) {
await handleUserEvent(args, ‘User Created’);
},

onUserUpdateHandler: async function (args) {
await handleUserEvent(args, ‘User Updated’);
},
};

async function handleUserEvent(args, eventType) {
try {
console.log(
--------------------Starting Event: ${eventType} | UserId:${args.data.user.id}-------------------
);

// rest of the code

As seen I do log the event and the userId at the start of the app. This is not displayed after installation.

Have tried to trigger the app from the browser, and from postman(by calling a PUT request on both requester and agent)

Any known error from this serverless release?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.