Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Opolka
vue-cdbp
Commits
e7c39480
Commit
e7c39480
authored
Jan 20, 2018
by
Markus Opolka
Browse files
Replace some list calls with quicker endpoint
- Improves the user experience
parent
d3e965e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib.js
View file @
e7c39480
...
...
@@ -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
...
...
src/components/Features.vue
View file @
e7c39480
...
...
@@ -149,9 +149,9 @@ export default {
},
created
()
{
// Create list of all letters
this
.
$http
.
get
(
'
http://localhost:3000/api/
l
et
ters
'
).
then
(
function
(
data
)
{
for
(
let
value
of
data
.
body
)
{
this
.
letters
.
push
({
text
:
value
.
name
})
this
.
$http
.
get
(
'
http://localhost:3000/api/
m
et
adata/table
'
).
then
(
function
(
data
)
{
for
(
let
letter
of
data
.
body
)
{
this
.
letters
.
push
({
text
:
letter
.
name
})
}
})
}
...
...
src/components/Letters.vue
View file @
e7c39480
...
...
@@ -42,7 +42,7 @@ export default {
}
},
created
()
{
this
.
$http
.
get
(
'
http://localhost:3000/api/
l
et
ters
'
).
then
(
function
(
data
)
{
this
.
$http
.
get
(
'
http://localhost:3000/api/
m
et
adata/table
'
).
then
(
function
(
data
)
{
this
.
letters
=
data
.
body
})
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment