From c26e9b78af12bf1dff2e1a2f8b973a80780b2c27 Mon Sep 17 00:00:00 2001 From: leonnicolas Date: Sun, 27 Sep 2020 17:39:24 +0200 Subject: [PATCH] datasource/*: code a little clean up --- src/datasources/db/providerAPI.ts | 3 +-- src/model/Engagement.ts | 2 +- src/model/EquipmentType.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/datasources/db/providerAPI.ts b/src/datasources/db/providerAPI.ts index 0e59179..e1ed65a 100644 --- a/src/datasources/db/providerAPI.ts +++ b/src/datasources/db/providerAPI.ts @@ -1,5 +1,4 @@ import { DataSource } from 'apollo-datasource'; -import { GraphQLError } from 'graphql'; import { Connection, getConnection } from 'typeorm'; import { Provider } from '../../model/Provider'; @@ -28,7 +27,7 @@ export class ProviderAPI extends DataSource { } async createProvider (provider: any) { - let inserts: any; + let inserts: any = null; await this.connection.transaction(async (entityManager: any) => { inserts = await entityManager.getRepository(Provider) .createQueryBuilder('provider') diff --git a/src/model/Engagement.ts b/src/model/Engagement.ts index 665ce61..0baa813 100644 --- a/src/model/Engagement.ts +++ b/src/model/Engagement.ts @@ -1,4 +1,4 @@ -import { Entity, PrimaryGeneratedColumn, ManyToOne, Column, JoinColumn, JoinTable } from 'typeorm'; +import { Entity, PrimaryGeneratedColumn, ManyToOne, Column, JoinColumn } from 'typeorm'; import { Participant } from './Participant'; import { CargoBike } from './CargoBike'; import { EngagementType } from './EngagementType'; diff --git a/src/model/EquipmentType.ts b/src/model/EquipmentType.ts index 8b7019e..dc777e4 100644 --- a/src/model/EquipmentType.ts +++ b/src/model/EquipmentType.ts @@ -1,4 +1,4 @@ -import { Column, Entity, ManyToMany, OneToMany, PrimaryGeneratedColumn } from 'typeorm'; +import { Column, Entity, ManyToMany, PrimaryGeneratedColumn } from 'typeorm'; import { CargoBike, Lockable } from './CargoBike'; @Entity()