add: preparar archivos para hacer la petición al nuevo endpoint "build"
This commit is contained in:
@@ -1,11 +1,23 @@
|
||||
import axios from '../lib/axios';
|
||||
import api from '../lib/api';
|
||||
|
||||
export const calculateValueFunction = async (payload) => {
|
||||
try {
|
||||
const response = await axios.post('/criteria/doc/value-function', payload);
|
||||
return response.data;
|
||||
const response = await api.post('/criteria/doc/value-function', payload);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("Error en calculateValueFunction:", error);
|
||||
throw error;
|
||||
console.error('Error calculating value function:', error);
|
||||
throw error.response?.data?.detail || error.message;
|
||||
}
|
||||
};
|
||||
|
||||
export const buildFuzzyGraph = async (payload) => {
|
||||
try {
|
||||
const response = await api.post('/criteria/doc-mf/build', payload);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Error building fuzzy graph:', error);
|
||||
throw error.response?.data?.detail || error.message;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user