Spaces:
Paused
Paused
File size: 817 Bytes
ab2ded1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
import api from '@/utils/api';
import registerServer from '@/utils/register-server';
import request from '@/utils/request';
const {
getCanvas,
setCanvas,
listCanvas,
resetCanvas,
removeCanvas,
runCanvas,
listTemplates,
} = 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',
},
} as const;
const chatService = registerServer<keyof typeof methods>(methods, request);
export default chatService;
|