We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 094738e commit 7980ff7Copy full SHA for 7980ff7
src/api/services/quotesService.js
@@ -71,6 +71,11 @@ module.exports = {
71
72
async function getUnsplashImage(query) {
73
const accessKey = process.env.UNSPLASH_ACCESS_KEY;
74
+ if (!accessKey) {
75
+ console.error('Unsplash access key not configured');
76
+ return '';
77
+ }
78
+
79
const unsplashUrl = `https://api.unsplash.com/photos/random?query=${encodeURIComponent(query)}&client_id=${accessKey}`;
80
81
try {
0 commit comments