From 53717ed87deb2e14308e440623560c9a5ea53df9 Mon Sep 17 00:00:00 2001 From: Vitalik Date: Thu, 6 Oct 2022 23:27:30 +0300 Subject: [PATCH] FIX | fixed chats if order is taken --- deploy/dev.sh | 3 ++- src/domain/chats/services/chats-fixed.service.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy/dev.sh b/deploy/dev.sh index 12e0532..bdfccd6 100644 --- a/deploy/dev.sh +++ b/deploy/dev.sh @@ -4,5 +4,6 @@ ssh root@185.69.154.136 " git pull origin stage && npm run build && docker-compose -f docker-compose.stage.yml up -d && - docker-compose restart + docker restart api-rws_taskme-api_1 + " \ No newline at end of file diff --git a/src/domain/chats/services/chats-fixed.service.ts b/src/domain/chats/services/chats-fixed.service.ts index 568ed4c..63b13a5 100644 --- a/src/domain/chats/services/chats-fixed.service.ts +++ b/src/domain/chats/services/chats-fixed.service.ts @@ -40,7 +40,9 @@ export class ChatsFixedService implements Chats.IChatsFixedService { if (orderTaken) { for await (const [index, item] of itemsToRecalcOrder.entries()) { - await this.chatsFixedRepository.update(item.id, { order: order + index + 1 }) + await this.chatsFixedRepository.update(item.id, { + order: Number(order) + Number(index) + 1, + }) } } }