Control panel migration
This commit is contained in:
parent
47c61a7b35
commit
ce4fdf06f5
|
@ -1,16 +1,15 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, inject } from 'vue';
|
import { ref, onMounted, inject } from 'vue';
|
||||||
|
|
||||||
const jApi = inject('jApi');
|
const api = inject('api');
|
||||||
|
|
||||||
const links = ref([]);
|
const links = ref([]);
|
||||||
|
|
||||||
const getLinks = async () => {
|
const getLinks = async () => {
|
||||||
try {
|
try {
|
||||||
links.value = await jApi.query(
|
const filter = { order: 'name ASC' };
|
||||||
`SELECT image, name, description, link FROM link
|
const { data } = await api.get('/Links', { params: { filter } });
|
||||||
ORDER BY name`
|
links.value = data;
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error getting links:', error);
|
console.error('Error getting links:', error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue