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