Skip to content

Commit

Permalink
fix: typo in variable name token in Google tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Oct 24, 2024
1 parent 277c2ad commit fff8ab4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export async function createGoogleCalendarEvent(

if (!token) {
// try to get token by using Chrome Identity API
console.log("`token` not specified, trying retrieving through Google identity API OAuth flow...")
try {
const authResult = await chrome.identity.getAuthToken({
interactive: true,
Expand All @@ -90,11 +91,11 @@ export async function createGoogleCalendarEvent(
description: parameters.description || "",
start: {
dateTime: parameters.startDateTime,
timeZone, // Adjust this according to the user's time zone
timeZone,
},
end: {
dateTime: parameters.endDateTime,
timeZone, // Adjust this according to the user's time zone
timeZone,
},
};

Expand All @@ -104,7 +105,7 @@ export async function createGoogleCalendarEvent(
{
method: "POST",
headers: {
Authorization: `Bearer ${parameters.token}`,
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify(event),
Expand Down
2 changes: 1 addition & 1 deletion src/retriever.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function getCalendarEvents(
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: `Bearer ${parameters.token}`,
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
});
Expand Down

0 comments on commit fff8ab4

Please sign in to comment.