Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] pageview api struct refactor #2343

Merged
merged 5 commits into from
Feb 19, 2024
Merged

[fix] pageview api struct refactor #2343

merged 5 commits into from
Feb 19, 2024

Conversation

lizheming
Copy link
Collaborator

close #2207 when pr merged

getArticleCounter({
serverURL,
lang,
paths,
type: ['time'],
signal,
})
// TODO: Improve this API
Copy link
Collaborator Author

@lizheming lizheming Feb 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

由于 @waline/api 已经采用新的 API 结构了,所以旧版本的兼容可以移除掉。


Since @waline/api has adopted the new API structure, the compatibility of the old version can be removed.

export type GetArticleCounterResponseItem = Record<string, number> &
CounterFields;

export type GetArticleCounterResponse = GetArticleCounterResponseItem[];
Copy link
Collaborator Author

@lizheming lizheming Feb 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

优化 GetArticleCounterResponse 类型,移除掉非数组返回的兼容类型,统一返回类型的数据结构,增加已知类型的指定。


Optimize the GetArticleCounterResponse type, remove the compatible types returned by non-arrays, unify the data structure of the return type, and add the specification of known types.

@Mister-Hope Mister-Hope merged commit 3f740f5 into main Feb 19, 2024
17 checks passed
@Mister-Hope Mister-Hope deleted the fix/pageview branch February 19, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 其他页面 pageview 异常 || [Bug]: Pageview exception on other pages
2 participants