Merge pull request 'Migración vista Control panel' (!126) from wbuezas/hedera-web-mindshore:feature/admin-control-panel into beta
gitea/hedera-web/pipeline/head This commit looks good
Details
gitea/hedera-web/pipeline/head This commit looks good
Details
Reviewed-on: #126 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
commit
8ef7f531fb
|
@ -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