From 9ced8ec152d59e13d34ae5377288245a1e90a3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurij=20Podgor=C5=A1ek?= Date: Fri, 19 Jan 2024 14:23:07 +0100 Subject: [PATCH] Sortiranje, bugfix --- nuxt/stores/pojmi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nuxt/stores/pojmi.js b/nuxt/stores/pojmi.js index 65d4118..74c7719 100644 --- a/nuxt/stores/pojmi.js +++ b/nuxt/stores/pojmi.js @@ -6,11 +6,11 @@ export const usePojmiStore = defineStore('pojmi', { async naloziPojme() { const { jsonApiUrl, headers, deserialize } = useApi() - const data = await $fetch(`${jsonApiUrl}/node/concept`, { headers }) + const data = await $fetch(`${jsonApiUrl}/node/concept?sort=created`, { headers }) this.pojmi = await deserialize(data, s => ({ id: s.id, naslov: s.title, - tekst: s.body.processed, + tekst: s.body ? s.body.processed : '', media: s.field_media }), 'naslov') },