We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ecfd2c commit c84e862Copy full SHA for c84e862
apps/sim/app/api/schedules/[id]/route.ts
@@ -299,14 +299,12 @@ export async function DELETE(
299
request,
300
})
301
302
- if (workspaceId) {
303
- captureServerEvent(
304
- session.user.id,
305
- 'scheduled_task_deleted',
306
- { workspace_id: workspaceId },
307
- { groups: { workspace: workspaceId } }
308
- )
309
- }
+ captureServerEvent(
+ session.user.id,
+ 'scheduled_task_deleted',
+ { workspace_id: workspaceId ?? '' },
+ workspaceId ? { groups: { workspace: workspaceId } } : undefined
+ )
310
311
return NextResponse.json({ message: 'Schedule deleted successfully' })
312
} catch (error) {
0 commit comments