diff options
| author | Kamen Mladenov <kamen.d.mladenov@protonmail.com> | 2021-04-09 19:55:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-09 19:55:59 +0300 |
| commit | f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3 (patch) | |
| tree | 83b88a773bb7dc053bb3aced35bce302264ec925 /src/app/services/comment.service.ts | |
| parent | bcd88af53b1a920d728ec98b45daa9ac2e2c0917 (diff) | |
| parent | c13889759d70687de6833c505221c203f65fedb8 (diff) | |
| download | DevHive-Angular-f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3.tar DevHive-Angular-f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3.tar.gz DevHive-Angular-f849e37ccdd6fd48f83119a3b3b65cdd8b765dc3.zip | |
Second Stage: Complete
Diffstat (limited to 'src/app/services/comment.service.ts')
| -rw-r--r-- | src/app/services/comment.service.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/app/services/comment.service.ts b/src/app/services/comment.service.ts index c9dbf35..9839b01 100644 --- a/src/app/services/comment.service.ts +++ b/src/app/services/comment.service.ts @@ -2,7 +2,7 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Guid } from 'guid-typescript'; import { Observable } from 'rxjs'; -import { Comment } from 'src/models/comment'; +import { Comment } from 'src/models/comment.model'; import { AppConstants } from '../app-constants.module'; import { TokenService } from './token.service'; @@ -14,7 +14,7 @@ export class CommentService { { } getDefaultComment(): Comment { - return new Comment(Guid.createEmpty(), Guid.createEmpty(), 'Gosho', 'Trapov', 'gosho_trapov', 'Your opinion on my idea?', new Date()); + return new Comment(Guid.createEmpty(), Guid.createEmpty(), '', '', '', '', new Date()); } /* Requests from session storage */ @@ -55,7 +55,7 @@ export class CommentService { getCommentRequest(id: Guid): Observable<object> { const options = { - params: new HttpParams().set('Id', id.toString()) + params: new HttpParams().set('CommentId', id.toString()) }; return this._http.get(AppConstants.API_COMMENT_URL, options); } @@ -75,7 +75,7 @@ export class CommentService { deleteCommentRequest(commentId: Guid, authToken: string): Observable<object> { const options = { - params: new HttpParams().set('Id', commentId.toString()), + params: new HttpParams().set('CommentId', commentId.toString()), headers: new HttpHeaders().set('Authorization', 'Bearer ' + authToken) }; return this._http.delete(AppConstants.API_COMMENT_URL, options); |
