Sortiranje, bugfix
parent
8e8c19ff9a
commit
9ced8ec152
|
@ -6,11 +6,11 @@ export const usePojmiStore = defineStore('pojmi', {
|
||||||
async naloziPojme() {
|
async naloziPojme() {
|
||||||
const { jsonApiUrl, headers, deserialize } = useApi()
|
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 => ({
|
this.pojmi = await deserialize(data, s => ({
|
||||||
id: s.id,
|
id: s.id,
|
||||||
naslov: s.title,
|
naslov: s.title,
|
||||||
tekst: s.body.processed,
|
tekst: s.body ? s.body.processed : '',
|
||||||
media: s.field_media
|
media: s.field_media
|
||||||
}), 'naslov')
|
}), 'naslov')
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue