fix: avatar error remove (#4173)

* fix: avatar error remove

* fix: index

* fix: guide

* fix: auth
This commit is contained in:
Archer
2025-03-14 20:13:06 +08:00
committed by GitHub
parent 93f7747904
commit f406c64d3c
7 changed files with 24 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import { FilterQuery, Types } from 'mongoose';
import { quoteDataFieldSelector, QuoteDataItemType } from '@/service/core/chat/constants';
import { processChatTimeFilter } from '@/service/core/chat/utils';
import { ChatErrEnum } from '@fastgpt/global/common/error/code/chat';
import { getCollectionWithDataset } from '@fastgpt/service/core/dataset/controller';
export type GetCollectionQuoteProps = LinkedPaginationProps & {
chatId: string;
@@ -50,7 +51,8 @@ async function handler(
const limitedPageSize = Math.min(pageSize, 30);
const [{ chat, showRawSource }, { chatItem }] = await Promise.all([
const [collection, { chat, showRawSource }, { chatItem }] = await Promise.all([
getCollectionWithDataset(collectionId),
authChatCrud({
req,
authToken: true,
@@ -69,6 +71,8 @@ async function handler(
if (!chat) return Promise.reject(ChatErrEnum.unAuthChat);
const baseMatch: BaseMatchType = {
teamId: collection.teamId,
datasetId: collection.datasetId,
collectionId,
$or: [
{ updateTime: { $lt: new Date(chatItem.time) } },