Skip to content

Commit

Permalink
fix(api-gitee-v5): add timestamp to avoid caching
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed May 6, 2020
1 parent 5ce7114 commit e28ab03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/@vssue/api-gitee-v5/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@ export default class GiteeV5 implements VssueAPI.Instance {
issueId?: string | number;
issueTitle?: string;
}): Promise<VssueAPI.Issue | null> {
const options: AxiosRequestConfig = { params: {} };
const options: AxiosRequestConfig = {
params: {
// to avoid caching
timestamp: Date.now(),
},
};

if (accessToken) {
options.params.access_token = accessToken;
Expand Down Expand Up @@ -268,6 +273,8 @@ export default class GiteeV5 implements VssueAPI.Instance {
per_page: perPage,
// 'sort': 'created',
// 'direction': sort,
// to avoid caching
timestamp: Date.now(),
},
headers: {
Accept: ['application/vnd.gitee.html+json'],
Expand Down

0 comments on commit e28ab03

Please sign in to comment.