datasource/*: code a little clean up

pull/14/head
leonnicolas 4 years ago
parent a67c0ff659
commit c26e9b78af
No known key found for this signature in database
GPG Key ID: 088D0743E2B65C07

@ -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')

@ -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';

@ -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()

Loading…
Cancel
Save