mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
sync message on recoonect on ui
This commit is contained in:
@@ -11,6 +11,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
||||
import { MessageDeleteInputDTO } from '../../dto/message/messageDeleteInputDTO';
|
||||
import { InstanceId } from '../../../domain/chat-service.service';
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { HttpAdapter } from 'src/app/infra/http/adapter';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -22,6 +23,7 @@ export class MessageRemoteDataSourceService {
|
||||
constructor(
|
||||
private httpService: HttpService,
|
||||
private socket: SignalRService,
|
||||
private http: HttpAdapter
|
||||
) {}
|
||||
|
||||
@APIReturn(MessageOutPutDTOSchema, 'post/Messages')
|
||||
@@ -37,6 +39,13 @@ export class MessageRemoteDataSourceService {
|
||||
|
||||
// @APIReturn(MessageOutPutDTOSchema, 'get/Messages')
|
||||
async getMessagesFromRoom(id: string): DataSourceReturn<MessageOutPutDTO> {
|
||||
|
||||
var a = await this.http.get<MessageOutPutDTO>(`${this.baseUrl}/Room/${id}/Messages`)
|
||||
|
||||
return a.map((e) => {
|
||||
return e.data
|
||||
})
|
||||
|
||||
return await this.httpService.get(`${this.baseUrl}/Room/${id}/Messages`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user