@@ -1,3 +1,4 @@
|
||||
import { sendTelemetryEvents } from 'utils/telemetry/sendTelemetryEvent'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { authenticatedProcedure } from '@/utils/server/trpc'
|
||||
import { TRPCError } from '@trpc/server'
|
||||
@@ -49,6 +50,18 @@ export const createWorkspaceProcedure = authenticatedProcedure
|
||||
},
|
||||
})) as Workspace
|
||||
|
||||
await sendTelemetryEvents([
|
||||
{
|
||||
name: 'Workspace created',
|
||||
workspaceId: newWorkspace.id,
|
||||
userId: user.id,
|
||||
data: {
|
||||
name,
|
||||
plan,
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
return {
|
||||
workspace: newWorkspace,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user