diff --git a/backend/routes/GalleryRouter.ts b/backend/routes/GalleryRouter.ts index 18ec667c..dbdffdc6 100644 --- a/backend/routes/GalleryRouter.ts +++ b/backend/routes/GalleryRouter.ts @@ -52,7 +52,7 @@ export class GalleryRouter{ private addAutoComplete() { this.app.get("/api/gallery/autocomplete/:text", - // AuthenticationMWs.authenticate, + AuthenticationMWs.authenticate, GalleryMWs.autocomplete, RenderingMWs.renderResult ); diff --git a/common/entities/Directory.ts b/common/entities/Directory.ts index 98126299..22d512bb 100644 --- a/common/entities/Directory.ts +++ b/common/entities/Directory.ts @@ -1,10 +1,10 @@ import {Photo} from "./Photo"; export class Directory{ - constructor(public id:number, - public name:string, - public path:string, - public lastUpdate:Date, - public directories:Array, - public photos:Array){} + constructor(public id?:string, + public name?:string, + public path?:string, + public lastUpdate?:Date, + public directories:Array = [], + public photos:Array = []){} } \ No newline at end of file diff --git a/common/entities/Photo.ts b/common/entities/Photo.ts index 0074d003..af94fe59 100644 --- a/common/entities/Photo.ts +++ b/common/entities/Photo.ts @@ -1,7 +1,7 @@ import {Utils} from "../Utils"; import {Directory} from "./Directory"; export class Photo { - constructor(public id:number, public name:string, public width:number, public height:number) { + constructor(public id:string, public name:string, public width:number, public height:number) { } public static getThumbnailPath(directory:Directory,photo:Photo){ diff --git a/common/entities/User.ts b/common/entities/User.ts index 9954e996..873407b0 100644 --- a/common/entities/User.ts +++ b/common/entities/User.ts @@ -8,5 +8,5 @@ export enum UserRoles{ } export class User { - constructor(public id?:number,public name?:string, public password?:string, public role:UserRoles = UserRoles.User){} + constructor(public id?:string,public name?:string, public password?:string, public role:UserRoles = UserRoles.User){} } \ No newline at end of file diff --git a/frontend/app/gallery/gallery.component.html b/frontend/app/gallery/gallery.component.html index 0ec75c97..3246aa67 100644 --- a/frontend/app/gallery/gallery.component.html +++ b/frontend/app/gallery/gallery.component.html @@ -3,10 +3,10 @@
-
-
+
+
- +
\ No newline at end of file diff --git a/frontend/app/gallery/gallery.component.ts b/frontend/app/gallery/gallery.component.ts index 047bf799..8943234b 100644 --- a/frontend/app/gallery/gallery.component.ts +++ b/frontend/app/gallery/gallery.component.ts @@ -24,7 +24,7 @@ import {GallerySearchComponent} from "./search/search.gallery.component"; }) export class GalleryComponent implements OnInit{ - currentDirectory:Directory = new Directory(-1,"","/",new Date(),[],[]); + currentDirectory:Directory = new Directory(); constructor(private _galleryService:GalleryService, diff --git a/frontend/app/gallery/photo/photo.gallery.component.ts b/frontend/app/gallery/photo/photo.gallery.component.ts index 8be7d38b..9a2240d8 100644 --- a/frontend/app/gallery/photo/photo.gallery.component.ts +++ b/frontend/app/gallery/photo/photo.gallery.component.ts @@ -2,8 +2,7 @@ import {Component, Input, ElementRef, ViewChild} from '@angular/core'; import {Photo} from "../../../../common/entities/Photo"; -import {Directory} from "../../../../common/entities/Directory"; -import {Utils} from "../../../../common/Utils"; +import {Directory} from "../../../../common/entities/Directory"; import {IRenderable, Dimension} from "../../model/IRenderable"; @Component({ diff --git a/frontend/app/gallery/search/autocomplete.service.ts b/frontend/app/gallery/search/autocomplete.service.ts index 52fc3ef6..e2f41a33 100644 --- a/frontend/app/gallery/search/autocomplete.service.ts +++ b/frontend/app/gallery/search/autocomplete.service.ts @@ -14,7 +14,7 @@ export class AutoCompleteService extends NetworkService { super(_http); } - public autoComplete(text:string): Promise >>{ + public autoComplete(text:string): Promise >> { return this.getJson("/gallery/autocomplete/"+text); } diff --git a/frontend/app/gallery/search/search.gallery.component.html b/frontend/app/gallery/search/search.gallery.component.html index 44956235..ba05ab1e 100644 --- a/frontend/app/gallery/search/search.gallery.component.html +++ b/frontend/app/gallery/search/search.gallery.component.html @@ -1,7 +1,7 @@