Skip to content

Commit

Permalink
revoke exposed api secret and generate new ones for netlify. rename a…
Browse files Browse the repository at this point in the history
…pi secret environment variable.
  • Loading branch information
mikejguo290 committed Oct 4, 2021
1 parent 2d255ac commit 07533d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netlify/functions/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports.handler = async function (event, context) {
console.log(context);
try {
const { page, query } = event.queryStringParameters;
const response = await axios.get(`https://api.unsplash.com/search/photos?client_id=${process.env.UNSPLASH_API_KEY}&page=${page}&query=${query}`);
const response = await axios.get(`https://api.unsplash.com/search/photos?client_id=${process.env.UNSPLASH_API_ACCESS_KEY}&page=${page}&query=${query}`);
return {
statusCode: 200,
body: JSON.stringify(response.data),
Expand Down

0 comments on commit 07533d8

Please sign in to comment.