Skip to content
Snippets Groups Projects
Commit b7b365b2 authored by Hagen Dreßler's avatar Hagen Dreßler
Browse files

Move component comment path

parent 36024e22
Branches
1 merge request!102Resolve "comment creation api"
Pipeline #13816 passed with stage
in 34 seconds
......@@ -9,7 +9,7 @@ import { AuthenticationGuard } from './guards/authentication.guard';
import { UserRole } from './models/user-roles.enum';
import { RoomParticipantPageComponent } from './components/pages/room-participant-page/room-participant-page.component';
import { RoomCreatorPageComponent } from './components/pages/room-creator-page/room-creator-page.component';
import { CommentListComponent } from './components/fragments/comment-list/comment-list.component';
import { CommentListComponent } from './components/pages/comment-list/comment-list.component';
import { ContentListComponent } from './components/fragments/content-list/content-list.component';
import { StatisticsComponent } from './components/fragments/statistics/statistics.component';
import { ContentCreatePageComponent } from './components/pages/content-create-page/content-create-page.component';
......
......@@ -7,7 +7,7 @@ import { RoomJoinComponent } from './components/fragments/room-join/room-join.co
import { LoginComponent } from './components/fragments/login/login.component';
import { RegisterComponent } from './components/dialogs/register/register.component';
import { PasswordResetComponent } from './components/dialogs/password-reset/password-reset.component';
import { CommentListComponent } from './components/fragments/comment-list/comment-list.component';
import { CommentListComponent } from './components/pages/comment-list/comment-list.component';
import { AppRoutingModule } from './app-routing.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PageNotFoundPageComponent } from './components/pages/page-not-found-page/page-not-found-page.component';
......
......@@ -45,19 +45,11 @@ export class CommentListComponent implements OnInit {
}
getComments(roomId: string): void {
if (this.userRole === UserRole.CREATOR) {
this.commentService.getComments(roomId)
.subscribe(comments => {
this.comments = comments;
this.isLoading = false;
});
} else if (this.userRole === UserRole.PARTICIPANT) {
this.commentService.searchComments(roomId, this.user.id)
.subscribe(comments => {
this.comments = comments;
this.isLoading = false;
});
}
this.commentService.getComments(roomId)
.subscribe(comments => {
this.comments = comments;
this.isLoading = false;
});
}
setRead(comment: Comment): void {
......
......@@ -16,7 +16,7 @@
<mat-grid-list cols="2" rowHeight="2:1">
<mat-grid-tile>
<button mat-icon-button color="primary" matTooltip="Create comment"
routerLink="/participant/room/{{ room.id }}/create-comment">
routerLink="/participant/room/{{ room.shortId }}/create-comment">
<mat-icon>question_answer</mat-icon>
</button>
</mat-grid-tile>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment