Skip to content

Commit efe40be

Browse files
authored
Fix/hashnode (#472)
* fix cloud functions on pnpm * add missing field for graph
1 parent 30e0d52 commit efe40be

File tree

6 files changed

+60
-63
lines changed

6 files changed

+60
-63
lines changed

apps/firebase/functions/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
},
3939
"devDependencies": {
4040
"@types/uuid": "^8.3.0",
41+
"@types/node": "^14.18.36",
4142
"@typescript-eslint/eslint-plugin": "^5.28.0",
4243
"@typescript-eslint/parser": "^5.28.0",
4344
"eslint": "^8.9.0",

apps/firebase/functions/src/hashnode/scheduledNotionToHashNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ ${post.content}
158158
const response = await createPublicationStory(input);
159159
console.log(
160160
'createPublicationStory result:',
161-
JSON.stringify(response?.data)
161+
JSON.stringify(response)
162162
);
163163

164164
const hashnodeSlug =

apps/firebase/functions/src/utilities/calendly.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from 'node-fetch';
21
import { calendlyAccessToken } from '../config/config';
32
const calendlyApi = `https://api.calendly.com`;
43

apps/firebase/functions/src/utilities/hashnode.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ export const createPublicationStory = async (input: any) => {
2828
}
2929
`,
3030
variables: {
31-
input,
31+
input: {
32+
isPartOfPublication: {
33+
"publicationId": hashnodePublicationId,
34+
},
35+
...input,
36+
},
3237
},
3338
};
3439
console.log('calling mutation with: ', data);

apps/firebase/functions/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outDir": "lib",
77
"sourceMap": true,
88
"strict": true,
9-
"target": "es2017"
9+
"target": "es2022"
1010
},
1111
"compileOnSave": true,
1212
"include": ["src"]

0 commit comments

Comments
 (0)