LES DISCUSSIONS S'AFFICHENT
This commit is contained in:
@@ -15,14 +15,14 @@ export interface Message {
|
||||
export class discussionsService {
|
||||
|
||||
private http = inject(HttpClient);
|
||||
private apiUrl = 'http://localhost:5250';
|
||||
private apiUrl = 'http://localhost:5250/API';
|
||||
|
||||
getDiscussions(): Observable<Discussion[]> {
|
||||
return this.http.get<Discussion[]>(`${this.apiUrl}/main/menu`);
|
||||
return this.http.get<Discussion[]>(`${this.apiUrl}/discussions/my`);
|
||||
}
|
||||
|
||||
getMessages(discussionId: string): Observable<Message[]> {
|
||||
return this.http.get<Message[]>(`${this.apiUrl}/messages/${discussionId}`);
|
||||
return this.http.get<Message[]>(`${this.apiUrl}/discussions/${discussionId}/messages`);
|
||||
}
|
||||
|
||||
createPrivateDiscussion(username: string): Observable<Discussion> {
|
||||
|
||||
Reference in New Issue
Block a user