add generic repository

This commit is contained in:
Peter Maquiran
2024-08-07 16:31:31 +01:00
parent b61b87ce6c
commit 75a8822e57
6 changed files with 59 additions and 59 deletions
@@ -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
}