Files
ragflow_python/web/src/services/flow-service.ts
balibabu 6c26872799 feat: Test the database connection of the ExeSQL operator #1739 (#2036)
### What problem does this PR solve?

feat: Test the database connection of the ExeSQL operator #1739
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
2024-08-21 15:33:44 +08:00

54 lines
902 B
TypeScript

import api from '@/utils/api';
import registerServer from '@/utils/register-server';
import request from '@/utils/request';
const {
getCanvas,
setCanvas,
listCanvas,
resetCanvas,
removeCanvas,
runCanvas,
listTemplates,
testDbConnect,
} = api;
const methods = {
getCanvas: {
url: getCanvas,
method: 'get',
},
setCanvas: {
url: setCanvas,
method: 'post',
},
listCanvas: {
url: listCanvas,
method: 'get',
},
resetCanvas: {
url: resetCanvas,
method: 'post',
},
removeCanvas: {
url: removeCanvas,
method: 'post',
},
runCanvas: {
url: runCanvas,
method: 'post',
},
listTemplates: {
url: listTemplates,
method: 'get',
},
testDbConnect: {
url: testDbConnect,
method: 'post',
},
} as const;
const chatService = registerServer<keyof typeof methods>(methods, request);
export default chatService;