mirror of https://github.com/Lissy93/dashy.git
♻️ rename story type fetch method
This commit is contained in:
parent
cfdd4a13e8
commit
098600365a
|
@ -32,7 +32,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
storyType() {
|
stories() {
|
||||||
// This can be `beststories`, `topstories` or newstories
|
// This can be `beststories`, `topstories` or newstories
|
||||||
// TODO: display error message if another string not matching the keywords was insert
|
// TODO: display error message if another string not matching the keywords was insert
|
||||||
return this.options.stories || 'topstories';
|
return this.options.stories || 'topstories';
|
||||||
|
@ -41,7 +41,7 @@ export default {
|
||||||
return this.options.limit || 10;
|
return this.options.limit || 10;
|
||||||
},
|
},
|
||||||
endpoint() {
|
endpoint() {
|
||||||
return `${widgetApiEndpoints.hackernewsTrending}/${this.storyType}.json`;
|
return `${widgetApiEndpoints.hackernewsTrending}/${this.stories}.json`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue