Skip to content

Commit

Permalink
Refactor to return essential information only
Browse files Browse the repository at this point in the history
  • Loading branch information
jayehernandez committed Dec 4, 2023
1 parent e5526b8 commit 6494f66
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/routes/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ const helpers = {
},
getPhoto: async () =>
unsplash.photos.getRandom({ collectionIds: [9836658] }).then((result) => {
return result.response;
const photoResult = result.response;
return {
urls: {
full: photoResult.urls.full,
},
user: {
name: photoResult.user.name,
username: photoResult.user.username,
},
};
}),
};

Expand Down

1 comment on commit 6494f66

@vercel
Copy link

@vercel vercel bot commented on 6494f66 Dec 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

letra-extension – ./server

letra-extension.vercel.app
letra-extension-jayehernandez.vercel.app
letra-extension-git-master-jayehernandez.vercel.app

Please sign in to comment.