Feature/additional endpoints (#257)

* new recipe summary route

* add categories to cards

* add pillow

* show tags instead of categories

* additional debug info

* add todays meal image url

* about page

* fix reactive tag

* changelog + docs

* bump version

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-04-03 11:25:57 -08:00
committed by GitHub
parent 4c3f751e80
commit 764f85fb40
23 changed files with 330 additions and 119 deletions

View File

@@ -5,6 +5,7 @@ const prefix = baseURL + "debug";
const debugURLs = {
version: `${prefix}/version`,
debug: `${prefix}`,
lastRecipe: `${prefix}/last-recipe-json`,
demo: `${prefix}/is-demo`,
};
@@ -14,6 +15,12 @@ export const metaAPI = {
let response = await apiReq.get(debugURLs.version);
return response.data;
},
async getDebugInfo() {
const response = await apiReq.get(debugURLs.debug);
return response.data;
},
async getLastJson() {
let response = await apiReq.get(debugURLs.lastRecipe);
return response.data;

View File

@@ -8,6 +8,7 @@ const prefix = baseURL + "recipes/";
const recipeURLs = {
allRecipes: baseURL + "recipes",
summary: baseURL + "recipes" + "/summary",
allRecipesByCategory: prefix + "category",
create: prefix + "create",
createByURL: prefix + "create-url",
@@ -86,6 +87,11 @@ export const recipeAPI = {
return response.data;
},
async allSummary() {
const response = await apiReq.get(recipeURLs.summary);
return response.data;
},
recipeImage(recipeSlug) {
return `/api/recipes/${recipeSlug}/image?image_type=original`;
},