Migrate image collections

This commit is contained in:
William Buezas 2025-03-25 11:42:53 +01:00
parent f8cf865e04
commit a7264fe1fc
1 changed files with 2 additions and 4 deletions

View File

@ -7,7 +7,6 @@ import VnForm from 'src/components/common/VnForm.vue';
import VnInput from 'src/components/common/VnInput.vue'; import VnInput from 'src/components/common/VnInput.vue';
import useNotify from 'src/composables/useNotify.js'; import useNotify from 'src/composables/useNotify.js';
const jApi = inject('jApi');
const api = inject('api'); const api = inject('api');
const { t } = useI18n(); const { t } = useI18n();
const { notify } = useNotify(); const { notify } = useNotify();
@ -45,9 +44,8 @@ const isSubmitable = computed(() =>
const getImageCollections = async () => { const getImageCollections = async () => {
try { try {
imageCollections.value = await jApi.query( const { data } = await api.get('imageCollections');
'SELECT name, `desc` FROM imageCollection ORDER BY `desc`' imageCollections.value = data;
);
} catch (error) { } catch (error) {
console.error('Error getting image collections:', error); console.error('Error getting image collections:', error);
} }