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
......@@ -155,12 +155,15 @@ function metadataTable (objs) {
try {
items.push({
title: meta.title._text,
name: item.name,
collection: meta.collection._text,
author: meta.author._text,
recipient: meta.recipient._text,
gender: meta.gender._text,
date: meta.date._text,
place: meta.place._text
place: meta.place._text,
url: item.url,
link: item.link
})
} catch (err) {
console.log(arguments.callee) // eslint-disable-line no-caller
......
......@@ -149,9 +149,9 @@ export default {
},
created () {
// Create list of all letters
this.$http.get('http://localhost:3000/api/letters').then(function (data) {
for (let value of data.body) {
this.letters.push({text: value.name})
this.$http.get('http://localhost:3000/api/metadata/table').then(function (data) {
for (let letter of data.body) {
this.letters.push({text: letter.name})
}
})
}
......
......@@ -42,7 +42,7 @@ export default {
}
},
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
})
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment