Skip to content

Commit

Permalink
Move extra variables inline
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaScorpion committed Jun 28, 2024
1 parent 3453a4f commit 07668dc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/TimeChimpApi.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
export class TimeChimpApi {
private async doFetch<T>(path: string): Promise<T> {
const token = this.getToken();
const url = `https://web.timechimp.com${path}`;
const response = await fetch(url, {
const response = await fetch(`https://web.timechimp.com${path}`, {
headers: {
Authorization: `Bearer ${token}`,
Authorization: `Bearer ${this.getToken()}`,
},
});
const body = await response.text();
Expand Down

0 comments on commit 07668dc

Please sign in to comment.