Merge pull request #14 from Irev-Dev/simplify-identity-signup-function

simplify identity signup function
This commit was merged in pull request #14.
This commit is contained in:
Kurt Hutten
2020-10-19 19:53:53 +11:00
committed by GitHub

View File

@@ -1,4 +1,6 @@
import { createUser } from 'src/services/users/users.js' // import { createUser } from 'src/services/users/users.js'
// identity-signup.js
export const handler = async (req, _context) => { export const handler = async (req, _context) => {
const body = JSON.parse(req.body) const body = JSON.parse(req.body)
@@ -13,15 +15,15 @@ export const handler = async (req, _context) => {
if (eventType === 'signup') { if (eventType === 'signup') {
roles.push('user') roles.push('user')
const hi = { // const hi = {
email: 'kurt.hutten@gmail.com', // email: 'kurt.hutten@gmail.com',
image: '', // image: '',
bio: '' // bio: ''
} // }
const input = { // const input = {
email, // email,
} // }
createUser({input}) // createUser({input})
return { return {
statusCode: 200, statusCode: 200,