Fix merge issue flexible backend (#1685)

* Fix merge issue flexible backend

* Fix tests

* Try fix tests

* Try fix tests
This commit is contained in:
Charles Bochet
2023-09-20 19:11:21 -07:00
committed by GitHub
parent 19365f6639
commit 2d758c990b
14 changed files with 98 additions and 46 deletions
@@ -1,5 +1,7 @@
import { Test, TestingModule } from '@nestjs/testing';
import { EnvironmentService } from 'src/integrations/environment/environment.service';
import { UniversalResolver } from './universal.resolver';
import { UniversalService } from './universal.service';
@@ -14,6 +16,10 @@ describe('UniversalResolver', () => {
provide: UniversalService,
useValue: {},
},
{
provide: EnvironmentService,
useValue: {},
},
],
}).compile();
@@ -12,7 +12,6 @@ import { UniversalService } from './universal.service';
import { FindManyUniversalArgs } from './args/find-many-universal.args';
import { FindUniqueUniversalArgs } from './args/find-unique-universal.args';
import { UpdateOneCustomArgs } from './args/update-one-custom.args';
@UseGuards(JwtAuthGuard)
@Resolver(() => UniversalEntity)
@@ -47,7 +46,7 @@ export class UniversalResolver {
}
@Query(() => UniversalEntity)
updateOneCustom(@Args() args: UpdateOneCustomArgs): UniversalEntity {
updateOneCustom(): UniversalEntity {
if (!this.environmentService.isFlexibleBackendEnabled()) {
throw new ForbiddenException();
}
@@ -61,7 +60,7 @@ export class UniversalResolver {
}
@Query(() => UniversalEntity)
deleteOneCustom(@Args() args: UpdateOneCustomArgs): UniversalEntity {
deleteOneCustom(): UniversalEntity {
if (!this.environmentService.isFlexibleBackendEnabled()) {
throw new ForbiddenException();
}