track create user
This commit is contained in:
parent
a15d39110b
commit
c2945f11b7
|
@ -15,6 +15,7 @@ import {
|
||||||
} from '../../common/util/clean-username'
|
} from '../../common/util/clean-username'
|
||||||
import { sendWelcomeEmail } from './emails'
|
import { sendWelcomeEmail } from './emails'
|
||||||
import { isWhitelisted } from '../../common/envs/constants'
|
import { isWhitelisted } from '../../common/envs/constants'
|
||||||
|
import { track } from './analytics'
|
||||||
|
|
||||||
export const createUser = functions
|
export const createUser = functions
|
||||||
.runWith({ minInstances: 1, secrets: ['MAILGUN_KEY'] })
|
.runWith({ minInstances: 1, secrets: ['MAILGUN_KEY'] })
|
||||||
|
@ -86,6 +87,8 @@ export const createUser = functions
|
||||||
|
|
||||||
await sendWelcomeEmail(user, privateUser)
|
await sendWelcomeEmail(user, privateUser)
|
||||||
|
|
||||||
|
await track(userId, 'create user', { username }, { ip: ipAddress })
|
||||||
|
|
||||||
return { status: 'success', user }
|
return { status: 'success', user }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user