Skip to content

Commit d5299ba

Browse files
authored
Merge pull request #16 from dusvlf111/issue/#15
Enhance API request URL by adding a timestamp to prevent caching. Thi…
2 parents 1885558 + 2ec6997 commit d5299ba

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/services/api/github-app.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ class GitHubAppAPI {
2020
options: RequestInit = {},
2121
token?: string
2222
): Promise<T> {
23-
const url = `${this.baseURL}${endpoint}`;
23+
// 캐시 방지를 위한 타임스탬프 추가
24+
const timestamp = Date.now();
25+
const separator = endpoint.includes('?') ? '&' : '?';
26+
const url = `${this.baseURL}${endpoint}${separator}_t=${timestamp}`;
2427
console.log('Making API request to:', url);
2528

2629
const headers: Record<string, string> = {

0 commit comments

Comments
 (0)