1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-02 20:15:24 +02:00

feat: Recipe Timeline Images (#2444)

* refactored recipe image paths/service

* added routes for updating/fetching timeline images

* make generate

* added event image upload and rendering

* switched update to patch to preserve timestamp

* added tests

* tweaked order of requests

* always reload events when opening the timeline

* re-arranged elements to make them look nicer

* delete files when timeline event is deleted
This commit is contained in:
Michael Genson 2023-08-06 12:49:30 -05:00 committed by GitHub
parent 06962cf865
commit dfe4942451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 355 additions and 92 deletions

View file

@ -310,6 +310,11 @@ def media_recipes_recipe_id_images_file_name(recipe_id, file_name):
return f"{prefix}/media/recipes/{recipe_id}/images/{file_name}"
def media_recipes_recipe_id_images_timeline_timeline_event_id_file_name(recipe_id, timeline_event_id, file_name):
"""`/api/media/recipes/{recipe_id}/images/timeline/{timeline_event_id}/{file_name}`"""
return f"{prefix}/media/recipes/{recipe_id}/images/timeline/{timeline_event_id}/{file_name}"
def media_users_user_id_file_name(user_id, file_name):
"""`/api/media/users/{user_id}/{file_name}`"""
return f"{prefix}/media/users/{user_id}/{file_name}"
@ -395,6 +400,11 @@ def recipes_timeline_events_item_id(item_id):
return f"{prefix}/recipes/timeline/events/{item_id}"
def recipes_timeline_events_item_id_image(item_id):
"""`/api/recipes/timeline/events/{item_id}/image`"""
return f"{prefix}/recipes/timeline/events/{item_id}/image"
def shared_recipes_item_id(item_id):
"""`/api/shared/recipes/{item_id}`"""
return f"{prefix}/shared/recipes/{item_id}"