mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-10-31 10:13:32 -04:00 
			
		
		
		
	create new recipe without image
This commit is contained in:
		| @@ -83,12 +83,19 @@ export default { | ||||
|     onFileChange() { | ||||
|       this.image = URL.createObjectURL(this.fileObject); | ||||
|     }, | ||||
|  | ||||
|     async createRecipe() { | ||||
|       this.isLoading = true; | ||||
|  | ||||
|       if (this.fileObject) { | ||||
|         this.recipeDetails.image = this.fileObject.name; | ||||
|       }  | ||||
|       let slug = await api.recipes.create(this.recipeDetails); | ||||
|  | ||||
|       if (this.fileObject) { | ||||
|         await api.recipes.updateImage(slug, this.fileObject); | ||||
|       } | ||||
|  | ||||
|       this.isLoading = false; | ||||
|  | ||||
|       this.$router.push(`/recipe/${slug}`); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user