Fix assert unreachable, remove unused variables (#13753)
Small code cleanup
This commit is contained in:
+1
-3
@@ -1,4 +1,4 @@
|
||||
import { Inject, Injectable, Logger } from '@nestjs/common';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
|
||||
import { ConfigVariables } from 'src/engine/core-modules/twenty-config/config-variables';
|
||||
import { CONFIG_VARIABLES_INSTANCE_TOKEN } from 'src/engine/core-modules/twenty-config/constants/config-variables-instance-tokens.constants';
|
||||
@@ -13,8 +13,6 @@ import { TypedReflect } from 'src/utils/typed-reflect';
|
||||
|
||||
@Injectable()
|
||||
export class ConfigValueConverterService {
|
||||
private readonly logger = new Logger(ConfigValueConverterService.name);
|
||||
|
||||
constructor(
|
||||
@Inject(CONFIG_VARIABLES_INSTANCE_TOKEN)
|
||||
private readonly configVariables: ConfigVariables,
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import { AssertOrWarn } from 'src/engine/core-modules/twenty-config/decorators/a
|
||||
describe('AssertOrWarn Decorator', () => {
|
||||
it('should pass validation if the condition is met', () => {
|
||||
class ConfigVariables {
|
||||
@AssertOrWarn((object, value) => value > 10, {
|
||||
@AssertOrWarn((_object, value) => value > 10, {
|
||||
message: 'Value should be higher than 10',
|
||||
})
|
||||
someProperty!: number;
|
||||
@@ -24,7 +24,7 @@ describe('AssertOrWarn Decorator', () => {
|
||||
|
||||
it('should provide a warning message if the condition is not met', () => {
|
||||
class ConfigVariables {
|
||||
@AssertOrWarn((object, value) => value > 10, {
|
||||
@AssertOrWarn((_object, value) => value > 10, {
|
||||
message: 'Value should be higher than 10',
|
||||
})
|
||||
someProperty!: number;
|
||||
|
||||
Reference in New Issue
Block a user