feat: Added a chatroom component, that is navigatable by the chatroom's ID
[demos/kafka/chat] / src / app / chatroom.service.ts
index 77b0818..ab92206 100644 (file)
@@ -9,10 +9,15 @@ import { Chatroom } from "./chatroom";
 export class ChatroomService {
 
   private uriList = 'http://localhost:8080/list';
+  private uriGet = 'http://localhost:8080/get/';
 
   constructor(private http: HttpClient) { }
 
   getChatrooms(): Observable<Chatroom[]> {
     return this.http.get<Chatroom[]>(this.uriList);
   }
+
+  getChatroom(id: String): Observable<Chatroom> {
+    return this.http.get<Chatroom>(this.uriGet + id);
+  }
 }