mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 04:55:30 +03:00
parent
0e375d9021
commit
a10324cbd3
@ -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 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user