mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
reorganizde file path
This commit is contained in:
+4
-3
@@ -20,19 +20,20 @@ export class SocketMessageUpdateUseCaseService {
|
||||
|
||||
ParamsValidation(MessageOutPutDataDTOSchema, data, tracing)
|
||||
tracing?.addEvent("Message existe?")
|
||||
const result = await this.messageLocalDataSourceService.messageExist({id: data.id})
|
||||
const result = await this.messageLocalDataSourceService.findOne({id: data.id})
|
||||
|
||||
const incomingMessage = {
|
||||
...data,
|
||||
sending: false
|
||||
}
|
||||
|
||||
if(result.isOk()) {
|
||||
if(result.isOk() && result.value) {
|
||||
|
||||
tracing?.addEvent("Message found")
|
||||
const updateResult = await this.messageLocalDataSourceService.update(result.value.$id, incomingMessage)
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
return updateResult
|
||||
} else {
|
||||
} else if(result.isOk() && !result.value) {
|
||||
tracing?.addEvent("Message not found")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user