From 1f2bca2261d4a56d98a5554f81f9af4bbe463a83 Mon Sep 17 00:00:00 2001 From: Braun Patrik Date: Sun, 24 Apr 2016 23:20:55 +0200 Subject: [PATCH] adding missing reference --- backend/model/mongoose/DatabaseManager.ts | 2 ++ backend/model/mongoose/MongoGalleryManager.ts | 4 ---- test/backend/initMongo.ts | 6 +++++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/model/mongoose/DatabaseManager.ts b/backend/model/mongoose/DatabaseManager.ts index 6c59d47c..a7b0b574 100644 --- a/backend/model/mongoose/DatabaseManager.ts +++ b/backend/model/mongoose/DatabaseManager.ts @@ -1,3 +1,5 @@ +/// + import * as mongoose from 'mongoose'; import {Schema} from "mongoose"; export class DatabaseManager{ diff --git a/backend/model/mongoose/MongoGalleryManager.ts b/backend/model/mongoose/MongoGalleryManager.ts index 73876cd0..17e0dad1 100644 --- a/backend/model/mongoose/MongoGalleryManager.ts +++ b/backend/model/mongoose/MongoGalleryManager.ts @@ -1,11 +1,7 @@ -import * as fs from 'fs'; import * as path from 'path'; -import * as mime from 'mime'; -import * as sizeOf from 'image-size'; import {Schema} from "mongoose"; import {Directory} from "../../../common/entities/Directory"; -import {Photo} from "../../../common/entities/Photo"; import {IGalleryManager} from "../IGalleryManager"; import {DatabaseManager} from "./DatabaseManager"; import {DiskManager} from "../DiskManger"; diff --git a/test/backend/initMongo.ts b/test/backend/initMongo.ts index 44ed5316..e197f7ea 100644 --- a/test/backend/initMongo.ts +++ b/test/backend/initMongo.ts @@ -3,9 +3,13 @@ import {MongoUserManager} from "../../backend/model/mongoose/MongoUserManager"; import {User, UserRoles} from "../../common/entities/User"; import {DatabaseManager} from "../../backend/model/mongoose/DatabaseManager"; -DatabaseManager.getInstance((err)=>{},()=>{ +DatabaseManager.getInstance((err)=>{ + DatabaseManager.getInstance().disconnect(); + process.exit() +},()=>{ let userManager = new MongoUserManager(); userManager.createUser(new User(0,"demo","demo@demo.hu","demo",UserRoles.Developer),(err)=>{ DatabaseManager.getInstance().disconnect(); + process.exit() }); }); \ No newline at end of file