Skip to content

Commit

Permalink
add images handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Doarakko committed Aug 21, 2024
1 parent a8a2224 commit 83f8ba8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ async function run() {
})
.then((data) => {
const cardName = data.name;
if (!(('card_images' in data) && Array.isArray(data.card_images) && data.card_images.length > 0)) {
throw new Error("Failed to get card images");
}
const imageUrl = data.card_images[0].image_url;

octokit.request(
Expand Down

0 comments on commit 83f8ba8

Please sign in to comment.