mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-17 01:12:28 -05:00
feat: Add DELETE /{slug}/image (#6259)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7bb0f0801a
commit
bb67d993a0
@@ -5,6 +5,7 @@
|
||||
:slug="recipe.slug"
|
||||
@upload="uploadImage"
|
||||
@refresh="imageKey++"
|
||||
@delete="deleteImage"
|
||||
/>
|
||||
<RecipeSettingsMenu
|
||||
v-model="recipe.settings"
|
||||
@@ -78,4 +79,10 @@ async function uploadImage(fileObject: File) {
|
||||
}
|
||||
imageKey.value++;
|
||||
}
|
||||
|
||||
async function deleteImage() {
|
||||
// The image is already deleted on the backend, just need to update the UI
|
||||
recipe.value.image = "";
|
||||
imageKey.value++;
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user