tests & image-request on google & inspirobot & front
This commit is contained in:
@@ -10,14 +10,12 @@ export async function searchAndResizeImage(query) {
|
||||
const imageUrl = data.items[0].link;
|
||||
console.log('Image URL:', imageUrl);
|
||||
return imageUrl;
|
||||
} else {
|
||||
console.error('No image found.');
|
||||
return "";
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error fetching image:', error);
|
||||
return "";
|
||||
}
|
||||
console.error('No image found.');
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user