mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 07:10:29 +08:00
Refactor: Standardize naming convention to camelCase (#14079)
### What problem does this PR solve? Refactor: Standardize naming convention to camelCase ### Type of change - [x] Refactoring
This commit is contained in:
@@ -47,7 +47,7 @@ export const useDeleteChunk = () => {
|
||||
} = useMutation({
|
||||
mutationKey: ['deleteChunk'],
|
||||
mutationFn: async (params: { chunkIds: string[]; doc_id: string }) => {
|
||||
const { data } = await kbService.rm_chunk(params);
|
||||
const { data } = await kbService.rmChunk(params);
|
||||
if (data.code === 0) {
|
||||
setPaginationParams(1);
|
||||
queryClient.invalidateQueries({ queryKey: ['fetchChunkList'] });
|
||||
@@ -70,9 +70,9 @@ export const useCreateChunk = () => {
|
||||
} = useMutation({
|
||||
mutationKey: ['createChunk'],
|
||||
mutationFn: async (payload: any) => {
|
||||
let service = kbService.create_chunk;
|
||||
let service = kbService.createChunk;
|
||||
if (payload.chunk_id) {
|
||||
service = kbService.set_chunk;
|
||||
service = kbService.setChunk;
|
||||
}
|
||||
const { data } = await service(payload);
|
||||
if (data.code === 0) {
|
||||
@@ -95,7 +95,7 @@ export const useFetchChunk = (chunkId?: string): ResponseType<any> => {
|
||||
initialData: {},
|
||||
gcTime: 0,
|
||||
queryFn: async () => {
|
||||
const data = await kbService.get_chunk({
|
||||
const data = await kbService.getChunk({
|
||||
chunk_id: chunkId,
|
||||
});
|
||||
|
||||
@@ -138,7 +138,7 @@ export const useFetchNextChunkList = (
|
||||
gcTime: 0,
|
||||
enabled,
|
||||
queryFn: async () => {
|
||||
const { data } = await kbService.chunk_list({
|
||||
const { data } = await kbService.chunkList({
|
||||
doc_id: documentId,
|
||||
page: pagination.current,
|
||||
size: pagination.pageSize,
|
||||
@@ -206,7 +206,7 @@ export const useSwitchChunk = () => {
|
||||
available_int?: number;
|
||||
doc_id: string;
|
||||
}) => {
|
||||
const { data } = await kbService.switch_chunk(params);
|
||||
const { data } = await kbService.switchChunk(params);
|
||||
if (data.code === 0) {
|
||||
message.success(t('message.modified'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user