fix image display

This commit is contained in:
hay-kot 2021-05-03 20:52:33 -08:00
parent 2fc44018ec
commit e13d203524
2 changed files with 4 additions and 4 deletions

View file

@ -135,14 +135,14 @@ export const recipeAPI = {
},
recipeImage(recipeSlug) {
return `/api/recipes/media/${recipeSlug}/image/original.webp`;
return `/api/recipes/media/${recipeSlug}/images/original.webp`;
},
recipeSmallImage(recipeSlug) {
return `/api/recipes/media/${recipeSlug}/image/min-original.webp`;
return `/api/recipes/media/${recipeSlug}/images/min-original.webp`;
},
recipeTinyImage(recipeSlug) {
return `/api/recipes/media/${recipeSlug}/image/tiny-original.webp`;
return `/api/recipes/media/${recipeSlug}/images/tiny-original.webp`;
},
};

View file

@ -20,7 +20,7 @@ class ImageType(str, Enum):
tiny = "tiny-original.webp"
@router.get("/{recipe_slug}/image/{file_name}")
@router.get("/{recipe_slug}/images/{file_name}")
async def get_recipe_img(recipe_slug: str, file_name: ImageType = ImageType.original):
"""Takes in a recipe slug, returns the static image. This route is proxied in the docker image
and should not hit the API in production"""