mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add opentelemetr logging
This commit is contained in:
@@ -8,20 +8,20 @@ import { SignalRService } from '../../../infra/socket/signal-r.service';
|
||||
export class MessageLiveDataSourceService {
|
||||
|
||||
constructor(
|
||||
public socket: WebSocketService,
|
||||
// public socket: WebSocketService,
|
||||
private signalR: SignalRService) {}
|
||||
|
||||
async sendMessage(data: WebSocketMessage) {
|
||||
// async sendMessage(data: WebSocketMessage) {
|
||||
|
||||
try {
|
||||
// // try {
|
||||
|
||||
const result = await this.socket.sendMessage(data).toPromise()
|
||||
// // const result = await this.socket.sendMessage(data).toPromise()
|
||||
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
return err(e)
|
||||
}
|
||||
// // return ok(result)
|
||||
// // } catch (e) {
|
||||
// // return err(e)
|
||||
// // }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -7,21 +7,21 @@ import { err, ok } from 'neverthrow';
|
||||
})
|
||||
export class RoomLiveDataSourceService {
|
||||
|
||||
constructor(private socket: WebSocketService) {}
|
||||
// constructor(private socket: WebSocketService) {}
|
||||
|
||||
async getRoomById(data: WebSocketMessage) {
|
||||
// async getRoomById(data: WebSocketMessage) {
|
||||
|
||||
try {
|
||||
// try {
|
||||
|
||||
const result = await this.socket.sendMessage(data).toPromise()
|
||||
// const result = await this.socket.sendMessage(data).toPromise()
|
||||
|
||||
console.log({result})
|
||||
// console.log({result})
|
||||
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
return err(e)
|
||||
}
|
||||
// return ok(result)
|
||||
// } catch (e) {
|
||||
// return err(e)
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { UserRemoveListInputDTO, UserRemoveListInputDTOSchema } from '../../dto/
|
||||
import { RoomUpdateInputDTO, RoomUpdateInputDTOSchema } from '../../dto/room/roomUpdateInputDTO';
|
||||
import { RoomUpdateOutputDTO } from '../../dto/room/roomUpdateOutputDTO';
|
||||
import { DataSourceReturn } from 'src/app/services/Repositorys/type';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -33,7 +34,7 @@ export class RoomRemoteDataSourceService {
|
||||
|
||||
@APIReturn(RoomListOutPutDTOSchema, 'get/Room')
|
||||
async getRoomList(): Promise<DataSourceReturn<RoomListOutPutDTO>> {
|
||||
return await this.httpService.get<RoomListOutPutDTO>(`${this.baseUrl}/Room`);
|
||||
return await this.httpService.get<RoomListOutPutDTO>(`${this.baseUrl}/Room?userId=${SessionStore.user.UserId}`);
|
||||
}
|
||||
|
||||
@ValidateSchema(RoomByIdInputDTOSchema)
|
||||
|
||||
Reference in New Issue
Block a user