Fix create user workflow action
This commit is contained in:
parent
9077e89192
commit
3bf0358716
|
@ -35,6 +35,9 @@ const ACTION = {
|
|||
password: "password",
|
||||
accessLevelId: "accessLevel",
|
||||
},
|
||||
args: {
|
||||
accessLevelId: "POWER_USER",
|
||||
},
|
||||
type: "ACTION",
|
||||
},
|
||||
SEND_EMAIL: {
|
||||
|
|
|
@ -5,13 +5,14 @@ const sgMail = require("@sendgrid/mail")
|
|||
sgMail.setApiKey(process.env.SENDGRID_API_KEY)
|
||||
|
||||
let BUILTIN_ACTIONS = {
|
||||
CREATE_USER: async function({ args, instanceId }) {
|
||||
CREATE_USER: async function({ args, context }) {
|
||||
const { username, password, accessLevelId } = args
|
||||
const ctx = {
|
||||
params: {
|
||||
instanceId,
|
||||
user: {
|
||||
instanceId: context.instanceId,
|
||||
},
|
||||
request: {
|
||||
body: args.user,
|
||||
body: { username, password, accessLevelId },
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue