2023-09-18 12:35:21 +00:00
|
|
|
import axios from 'axios';
|
|
|
|
import { defineStore } from 'pinia';
|
|
|
|
|
2023-09-28 11:45:14 +00:00
|
|
|
export const useValidationsStore = defineStore('validationsStore', {
|
|
|
|
state: () => ({
|
|
|
|
validations: null,
|
|
|
|
}),
|
|
|
|
actions: {
|
|
|
|
async fetchModels() {
|
|
|
|
try {
|
|
|
|
const { data } = await axios.get('Schemas/modelinfo');
|
|
|
|
this.validations = data;
|
|
|
|
} catch (error) {
|
|
|
|
console.error('Error al obtener las validaciones:', error);
|
|
|
|
}
|
2023-09-18 12:35:21 +00:00
|
|
|
},
|
2023-09-28 11:45:14 +00:00
|
|
|
},
|
|
|
|
});
|