mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix: link (#3987)
This commit is contained in:
@@ -29,8 +29,8 @@ async function handler(req: NextApiRequest): CreateCollectionResponse {
|
||||
});
|
||||
const { title = link, content = '' } = result[0];
|
||||
|
||||
if (!content) {
|
||||
return Promise.reject('Can not fetch content from link');
|
||||
if (!content || content === 'Cannot fetch internal url') {
|
||||
return Promise.reject(content || 'Can not fetch content from link');
|
||||
}
|
||||
|
||||
const { collectionId, insertResults } = await createCollectionAndInsertData({
|
||||
@@ -38,7 +38,7 @@ async function handler(req: NextApiRequest): CreateCollectionResponse {
|
||||
rawText: content,
|
||||
createCollectionParams: {
|
||||
...body,
|
||||
name: title,
|
||||
name: title || link,
|
||||
teamId,
|
||||
tmbId,
|
||||
type: DatasetCollectionTypeEnum.link,
|
||||
|
Reference in New Issue
Block a user