Skip to content

Commit

Permalink
console errors hashnode
Browse files Browse the repository at this point in the history
  • Loading branch information
codercatdev committed Dec 18, 2023
1 parent 602321d commit 70f730c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/codingcatdev/scripts/podcast-hashnode.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ ${content}`;
// Get new devto url and update
if (response.status === 200) {
const json = await response.json();
if (json?.errors?.length) {
console.error(JSON.stringify(json.errors));
continue;
}
console.log('hashnode url', json?.data?.createPublicationStory?.post?.slug);
const hashnodeSlug = json?.data?.createPublicationStory?.post?.slug;

Expand Down
6 changes: 6 additions & 0 deletions apps/codingcatdev/scripts/post-hashnode.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ for await (const file of g) {
// TODO: We might need to add a check on cononical if this page is already in dev.to
if (
fm?.slug &&
fm.slug === 'angular-17-cypress-testing' &&
fm?.title &&
fm?.cover &&
fm?.published === 'published' &&
Expand Down Expand Up @@ -107,6 +108,11 @@ ${content}`;
// Get new devto url and update
if (response.status === 200) {
const json = await response.json();
if (json?.errors?.length) {
console.error(JSON.stringify(json.errors));
continue;
}

console.log('hashnode url', json?.data?.createPublicationStory?.post?.slug);
const hashnodeSlug = json?.data?.createPublicationStory?.post?.slug;

Expand Down

1 comment on commit 70f730c

@vercel
Copy link

@vercel vercel bot commented on 70f730c Dec 18, 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:

codingcat-dev – ./apps/codingcatdev

codingcat-dev-coding-cat-dev.vercel.app
codingcat.dev
codingcat-dev-git-main-coding-cat-dev.vercel.app

Please sign in to comment.