create room

This commit is contained in:
Peter Maquiran
2024-06-04 16:21:11 +01:00
parent 4fb5bfc4d0
commit 541d12121e
23 changed files with 289 additions and 82 deletions
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { HttpService } from 'src/app/services/http.service';
import { MessageOutPutDTO } from '../../dto/message/messageOutputDTO';
import { MessageListInputDTO } from '../../dto/message/messageListInputDTO';
import { DataSourceReturn } from '../../../type';
@Injectable({
@@ -13,7 +14,6 @@ export class MessageRemoteDataSourceService {
constructor(private httpService: HttpService) {}
async sendMessage(message: any) {
return await this.httpService.post<any>(`${this.baseUrl}/Messages`, message);
}
@@ -22,7 +22,7 @@ export class MessageRemoteDataSourceService {
return await this.httpService.post<any>(`${this.baseUrl}/Messages/${id}/React`, reaction);
}
async getMessagesFromRoom(id: MessageListInputDTO) {
return await this.httpService.get<MessageOutPutDTO>(`${this.baseUrl}/Room/${id}/Messages`);
async getMessagesFromRoom(id: MessageListInputDTO): DataSourceReturn<MessageListInputDTO> {
return await this.httpService.get(`${this.baseUrl}/Room/${id}/Messages`);
}
}