diff --git a/package-lock.json b/package-lock.json index c299223..d513517 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3165,6 +3165,16 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -5895,6 +5905,13 @@ } } }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -8578,6 +8595,13 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true, + "optional": true + }, "nanoid": { "version": "3.1.22", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.22.tgz", @@ -14148,7 +14172,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", @@ -14783,7 +14811,11 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } }, "glob-parent": { "version": "3.1.0", diff --git a/package.json b/package.json index f1b2530..d3fad6c 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,9 @@ "@angular/platform-browser": "~11.2.10", "@angular/platform-browser-dynamic": "~11.2.10", "@angular/router": "~11.2.10", - "angularx-qrcode": "^10.0.11", "moment": "^2.29.1", - "openpgp": "^4.10.8", "rxjs": "~6.6.7", "tslib": "^2.0.0", - "unique-names-generator": "^4.3.1", "zone.js": "~0.10.2" }, "devDependencies": { diff --git a/src/app/services/vote.service.ts b/src/app/services/vote.service.ts index 5beb94c..d0b971a 100644 --- a/src/app/services/vote.service.ts +++ b/src/app/services/vote.service.ts @@ -16,10 +16,14 @@ export class VoteService { } voteEntryUp(id: number) { - return this.http.put(environment.apiUrl + "/v/e/" + id, {}); + return this.http.put(environment.apiUrl + "/v/e/" + id + "/up", {}); } voteEntryDown(id: number) { + return this.http.put(environment.apiUrl + "/v/e/" + id + "/down", {}); + } + + unvoteEntry(id: number) { return this.http.delete(environment.apiUrl + "/v/e/" + id, {}); } @@ -28,10 +32,14 @@ export class VoteService { } voteCommentUp(id: number) { - return this.http.put(environment.apiUrl + "/v/c/" + id, {}); + return this.http.put(environment.apiUrl + "/v/c/" + id + "/up", {}); } voteCommentDown(id: number) { + return this.http.put(environment.apiUrl + "/v/c/" + id + "/down", {}); + } + + unvoteComment(id: number) { return this.http.delete(environment.apiUrl + "/v/c/" + id, {}); } diff --git a/src/app/ui/comment/comment.ui.html b/src/app/ui/comment/comment.ui.html index d1deb87..c9bfe02 100644 --- a/src/app/ui/comment/comment.ui.html +++ b/src/app/ui/comment/comment.ui.html @@ -1,21 +1,29 @@