Skip to content

Commit

Permalink
fix(chat): wrong migration query
Browse files Browse the repository at this point in the history
  • Loading branch information
kkopanidis committed Nov 16, 2023
1 parent 5c2425c commit 21d2e49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/chat/src/migrations/chatMessage.migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ChatMessage } from '../models';

export const migrateChatMessages = async () => {
const query: Query<ChatMessage> = {
$or: [{ deleted: '' }, { deleted: { $exists: false } }],
$or: [{ deleted: { $exists: false } }],
};
let chatMessages = await ChatMessage.getInstance().findMany(query, undefined, 0, 100);
while (chatMessages.length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion modules/chat/src/migrations/chatRoom.migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ChatRoom } from '../models';

export const migrateChatRoom = async () => {
const query: Query<ChatRoom> = {
$or: [{ deleted: '' }, { deleted: { $exists: false } }],
$or: [{ deleted: { $exists: false } }],
};
let chatRooms = await ChatRoom.getInstance().findMany(query, undefined, 0, 100);
while (chatRooms.length === 0) {
Expand Down

0 comments on commit 21d2e49

Please sign in to comment.