refactored Generic API

This commit is contained in:
smilerz
2021-08-29 13:55:00 -05:00
parent caeb47aee9
commit a1d1cbac5d
15 changed files with 252 additions and 163 deletions

View File

@@ -730,7 +730,6 @@
searchKeywords: function (query) {
this.keywords_loading = true
this.$http.get("{% url 'api:keyword-list' %}" + '?query=' + query + '&limit=10').then((response) => {
console.log(response.data)
this.keywords = response.data.results;
this.keywords_loading = false
}).catch((err) => {
@@ -780,7 +779,7 @@
searchFoods: function (query) {
this.foods_loading = true
this.$http.get("{% url 'api:food-list' %}" + '?query=' + query + '&limit=10').then((response) => {
this.foods = response.data
this.foods = response.data.results
if (this.recipe !== undefined) {
for (let s of this.recipe.steps) {