mirror of
https://github.com/lingble/twenty.git
synced 2025-11-03 14:17:58 +00:00
@@ -1,6 +1,4 @@
|
|||||||
import { Args, Context, Mutation, Resolver } from '@nestjs/graphql';
|
import { Args, Mutation, Resolver } from '@nestjs/graphql';
|
||||||
|
|
||||||
import { Request } from 'express';
|
|
||||||
|
|
||||||
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
||||||
import { User } from 'src/engine/core-modules/user/user.entity';
|
import { User } from 'src/engine/core-modules/user/user.entity';
|
||||||
@@ -25,7 +23,6 @@ export class AnalyticsResolver {
|
|||||||
@Args() createAnalyticsInput: CreateAnalyticsInput,
|
@Args() createAnalyticsInput: CreateAnalyticsInput,
|
||||||
@AuthWorkspace() workspace: Workspace | undefined,
|
@AuthWorkspace() workspace: Workspace | undefined,
|
||||||
@AuthUser({ allowUndefined: true }) user: User | undefined,
|
@AuthUser({ allowUndefined: true }) user: User | undefined,
|
||||||
@Context('req') request: Request,
|
|
||||||
) {
|
) {
|
||||||
return this.analyticsService.create(
|
return this.analyticsService.create(
|
||||||
createAnalyticsInput,
|
createAnalyticsInput,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class AnalyticsService {
|
|||||||
userId: string | null | undefined,
|
userId: string | null | undefined,
|
||||||
workspaceId: string | null | undefined,
|
workspaceId: string | null | undefined,
|
||||||
) {
|
) {
|
||||||
if (this.environmentService.get('ANALYTICS_ENABLED')) {
|
if (!this.environmentService.get('ANALYTICS_ENABLED')) {
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user