Skip to content

Commit

Permalink
refactor(detectDialogflowIntent): move to Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Apr 27, 2023
1 parent c5d7b51 commit 85128f0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import crypto from 'crypto';

// https://googleapis.dev/nodejs/dialogflow/latest/v2beta1.SessionsClient.html
const sessionClient = new dialogflow.SessionsClient(/* { credentials } */);
let projectId = null;
let projectId: string | null = null;
sessionClient
.getProjectId()
.then((id) => {
Expand All @@ -13,7 +13,7 @@ sessionClient
})
.catch((e) => console.error('[Dialogflow]', e));

export default async function (input) {
export default async function (input: string) {
if (!projectId) {
return;
}
Expand Down

0 comments on commit 85128f0

Please sign in to comment.