mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add generic repository
This commit is contained in:
@@ -61,9 +61,9 @@ export class MessageRepositoryService {
|
||||
$id : localActionResult.value
|
||||
}
|
||||
|
||||
return this.messageLocalDataSourceService.update({...clone, sending: false, roomId: entity.roomId})
|
||||
return this.messageLocalDataSourceService.update(localActionResult.value, {...clone, sending: false, roomId: entity.roomId})
|
||||
} else {
|
||||
await this.messageLocalDataSourceService.update({sending: false, $id: localActionResult.value})
|
||||
await this.messageLocalDataSourceService.update(localActionResult.value, {sending: false, $id: localActionResult.value})
|
||||
return err('no connection')
|
||||
}
|
||||
|
||||
@@ -123,8 +123,9 @@ export class MessageRepositoryService {
|
||||
for(const message of addedItems) {
|
||||
let clone: TableMessage = message
|
||||
clone.roomId = id
|
||||
await this.messageLocalDataSourceService.createMessage(clone)
|
||||
|
||||
}
|
||||
await this.messageLocalDataSourceService.createManyMessage(addedItems.reverse())
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user