Skip to content

Commit

Permalink
(feat): sending user timezone (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
samyakkkk authored Apr 30, 2024
1 parent 9da113f commit 68aaaa9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vscode/src/repository/http-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ export async function makeAuthorizedHttpRequest<T>(config: AxiosRequestConfig, c


export async function refreshAccessToken(refreshToken: string): Promise<string> {
const userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const response = await makeHttpRequest<{ access_token: string }>({
url: baseUrl + '/account/github/refresh', method: 'POST',
data: {
'timezone': userTimezone
},
headers: {
// eslint-disable-next-line @typescript-eslint/naming-convention
Authorization: `Bearer ${refreshToken}`
Expand Down

0 comments on commit 68aaaa9

Please sign in to comment.