Skip to content

Commit

Permalink
chore: dataset fe adjusting (#1833)
Browse files Browse the repository at this point in the history
  • Loading branch information
FinleyGe authored Jun 24, 2024
1 parent 4a33e04 commit 9d29b47
Show file tree
Hide file tree
Showing 5 changed files with 490 additions and 433 deletions.
17 changes: 15 additions & 2 deletions projects/app/src/pages/api/core/dataset/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ import {
ReadPermissionVal
} from '@fastgpt/global/support/permission/constant';
import { MongoResourcePermission } from '@fastgpt/service/support/permission/schema';
import { parseParentIdInMongo } from '@fastgpt/global/common/parentFolder/utils';
import { DatasetDefaultPermission } from '@fastgpt/global/support/permission/dataset/constant';
import { ParentIdType } from '@fastgpt/global/common/parentFolder/type';
import { parseParentIdInMongo } from '@fastgpt/global/common/parentFolder/utils';

async function handler(req: NextApiRequest) {
const { parentId, type } = req.query as { parentId?: string; type?: DatasetTypeEnum };
const { parentId, type } = req.body as { parentId: ParentIdType; type?: DatasetTypeEnum };
// 凭证校验
const {
teamId,
Expand All @@ -27,6 +28,18 @@ async function handler(req: NextApiRequest) {
authApiKey: true,
per: ReadPermissionVal
});
console.log(
'parentId',
parentId,
'type',
type,
'teamId',
teamId,
'tmbId',
tmbId,
'tmbPer',
tmbPer
);

const [myDatasets, rpList] = await Promise.all([
MongoDataset.find({
Expand Down
Loading

0 comments on commit 9d29b47

Please sign in to comment.