add interface

This commit is contained in:
Peter Maquiran
2024-06-04 09:58:04 +01:00
parent c057606852
commit e8d68c45d7
4 changed files with 24 additions and 4 deletions
@@ -4,6 +4,7 @@ import { HttpService } from 'src/app/services/http.service';
import { RoomListOutPutDTO } from '../dto/roomListOutputDTO';
import { RoomListInputDTO } from '../dto/roomInputDTO';
import { RoomOutPutDTO } from '../dto/roomOutputDTO';
import { AddMemberToRoomInputDTO } from '../dto/addMemberToRoomInputDto';
@Injectable({
providedIn: 'root'
@@ -42,8 +43,8 @@ export class RoomRemoteDataSourceService {
return await this.httpService.delete<any>(`${this.baseUrl}/Room/${id}`);
}
async addMemberToRoom(id: string, member: any): Promise<Result<any ,any>> {
return await this.httpService.post<any>(`${this.baseUrl}/Room/${id}/Member`, member);
async addMemberToRoom(data: AddMemberToRoomInputDTO) {
return await this.httpService.post<any>(`${this.baseUrl}/Room/${data.id}/Member`, data.member);
}
async removeMemberFromRoom(id: string, member: any): Promise<Result<any ,any>> {