mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 09:01:06 +03:00
Changes getMessage date logic from Between to >= and <= to fix issue if invalid startDate is passed in
also cleans up imports from typeorm lib
This commit is contained in:
@@ -10,7 +10,7 @@ import logger from './utils/logger'
|
|||||||
import { expressRequestLogger } from './utils/logger'
|
import { expressRequestLogger } from './utils/logger'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import OpenAI from 'openai'
|
import OpenAI from 'openai'
|
||||||
import { Between, IsNull, FindOptionsWhere } from 'typeorm'
|
import { FindOptionsWhere, MoreThanOrEqual, LessThanOrEqual } from 'typeorm'
|
||||||
import {
|
import {
|
||||||
IChatFlow,
|
IChatFlow,
|
||||||
IncomingInput,
|
IncomingInput,
|
||||||
@@ -1464,7 +1464,8 @@ export class App {
|
|||||||
chatId,
|
chatId,
|
||||||
memoryType: memoryType ?? undefined,
|
memoryType: memoryType ?? undefined,
|
||||||
sessionId: sessionId ?? undefined,
|
sessionId: sessionId ?? undefined,
|
||||||
createdDate: toDate && fromDate ? Between(fromDate, toDate) : undefined
|
...(fromDate && { createdDate: MoreThanOrEqual(fromDate) }),
|
||||||
|
...(toDate && { createdDate: LessThanOrEqual(toDate) })
|
||||||
},
|
},
|
||||||
order: {
|
order: {
|
||||||
createdDate: sortOrder === 'DESC' ? 'DESC' : 'ASC'
|
createdDate: sortOrder === 'DESC' ? 'DESC' : 'ASC'
|
||||||
|
|||||||
Reference in New Issue
Block a user