fix trim()
This commit is contained in:
		@@ -85,7 +85,7 @@
 | 
				
			|||||||
		console.log(img_local)
 | 
							console.log(img_local)
 | 
				
			||||||
        	const data = {
 | 
					        	const data = {
 | 
				
			||||||
			image: img_local,
 | 
								image: img_local,
 | 
				
			||||||
			name: short_name,
 | 
								name: short_name.trim(),
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
        	await fetch(`/api/rezepte/img/add`, {
 | 
					        	await fetch(`/api/rezepte/img/add`, {
 | 
				
			||||||
        	    method: 'POST',
 | 
					        	    method: 'POST',
 | 
				
			||||||
@@ -108,7 +108,7 @@
 | 
				
			|||||||
				recipe: {
 | 
									recipe: {
 | 
				
			||||||
					...card_data,
 | 
										...card_data,
 | 
				
			||||||
					...add_info,
 | 
										...add_info,
 | 
				
			||||||
					images: {mediapath: short_name + '.webp', alt: "", caption: ""}, // TODO
 | 
										images: {mediapath: short_name.trim() + '.webp', alt: "", caption: ""}, // TODO
 | 
				
			||||||
					season: season_local,
 | 
										season: season_local,
 | 
				
			||||||
					short_name : short_name.trim(),
 | 
										short_name : short_name.trim(),
 | 
				
			||||||
					portions: portions_local,
 | 
										portions: portions_local,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -208,7 +208,7 @@
 | 
				
			|||||||
					...add_info,
 | 
										...add_info,
 | 
				
			||||||
					images, // TODO
 | 
										images, // TODO
 | 
				
			||||||
					season: season_local,
 | 
										season: season_local,
 | 
				
			||||||
					short_name short_name.trim(),
 | 
										short_name: short_name.trim(),
 | 
				
			||||||
					datecreated,
 | 
										datecreated,
 | 
				
			||||||
					portions: portions_local,
 | 
										portions: portions_local,
 | 
				
			||||||
					datemodified,
 | 
										datemodified,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user