Skip to content
Snippets Groups Projects
Commit ebb80913 authored by Lukas Mauß's avatar Lukas Mauß Committed by Tom Käsler
Browse files

Create websocket-comment service

parent 0580139c
Branches
Tags
No related merge requests found
......@@ -7,7 +7,7 @@ export class Comment {
read: boolean;
correct: boolean;
favorite: boolean;
creationTimestamp: number;
creationTimestamp: Date;
constructor(roomId: string = '',
userId: string = '',
......@@ -15,7 +15,7 @@ export class Comment {
read: boolean = false,
correct: boolean = false,
favorite: boolean = false,
creationTimestamp: number = 0) {
creationTimestamp: Date = null) {
this.id = '';
this.roomId = roomId;
this.userId = userId;
......
......@@ -7,7 +7,7 @@ export class PatchComment {
};
constructor(roomId: string, creatorId: string, body: string) {
this.type = 'CreateComment';
this.type = 'PatchComment';
this.payload = {
roomId: roomId,
creatorId: creatorId,
......
/* import { TestBed } from '@angular/core/testing';
import { WsCommentServiceService } from './ws-comment-service.service';
describe('WsCommentServiceService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: WsCommentServiceService = TestBed.get(WsCommentServiceService);
expect(service).toBeTruthy();
});
});
*/
import { Injectable } from '@angular/core';
import { Comment } from '../../models/comment';
import { RxStompService } from '@stomp/ng2-stompjs';
@Injectable({
providedIn: 'root'
})
export class WsCommentServiceService {
constructor(private rxStompService: RxStompService) { }
add(comment: Comment): void {
}
}
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