mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
create room
This commit is contained in:
+3
-3
@@ -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`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user