Skip to content
Snippets Groups Projects
Commit e7c39480 authored by Markus Opolka's avatar Markus Opolka
Browse files

Replace some list calls with quicker endpoint

 - Improves the user experience
parent d3e965e9
No related branches found
No related tags found
No related merge requests found
...@@ -155,12 +155,15 @@ function metadataTable (objs) { ...@@ -155,12 +155,15 @@ function metadataTable (objs) {
try { try {
items.push({ items.push({
title: meta.title._text, title: meta.title._text,
name: item.name,
collection: meta.collection._text, collection: meta.collection._text,
author: meta.author._text, author: meta.author._text,
recipient: meta.recipient._text, recipient: meta.recipient._text,
gender: meta.gender._text, gender: meta.gender._text,
date: meta.date._text, date: meta.date._text,
place: meta.place._text place: meta.place._text,
url: item.url,
link: item.link
}) })
} catch (err) { } catch (err) {
console.log(arguments.callee) // eslint-disable-line no-caller console.log(arguments.callee) // eslint-disable-line no-caller
......
...@@ -149,9 +149,9 @@ export default { ...@@ -149,9 +149,9 @@ export default {
}, },
created () { created () {
// Create list of all letters // Create list of all letters
this.$http.get('http://localhost:3000/api/letters').then(function (data) { this.$http.get('http://localhost:3000/api/metadata/table').then(function (data) {
for (let value of data.body) { for (let letter of data.body) {
this.letters.push({text: value.name}) this.letters.push({text: letter.name})
} }
}) })
} }
......
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
} }
}, },
created () { created () {
this.$http.get('http://localhost:3000/api/letters').then(function (data) { this.$http.get('http://localhost:3000/api/metadata/table').then(function (data) {
this.letters = data.body this.letters = data.body
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment