walinejs / waline

💬 A Simple, Safe Comment System
https://waline.js.org/en/
GNU General Public License v2.0
2.21k stars 381 forks source link

[Bug]: api return unexpected result to client #2547

Open Mister-Hope opened 3 months ago

Mister-Hope commented 3 months ago

问题描述 | Describe the bug

When the client gives path like path=path1,path2,path1,path3,path2, the server only return 3 results with path1,path2,path3.

问题网站 | Website URL

https://waline.js.org/guide/features/pageview.html

服务部署在哪里? | Where your waline deploy?

Vercel (Default)

数据存储在哪里?| Where your comment data store?

LeanCloud(https://leancloud.app)


Problem description | Describe the bug

When the client gives path like path=path1,path2,path1,path3,path2, the server only returns 3 results with path1,path2,path3.

Question Website | Website URL

https://waline.js.org/guide/features/pageview.html

Where is the service deployed? | Where your waline deploy?

Vercel (Default)

Where is the data stored? | Where your comment data store?

LeanCloud(https://leancloud.app)

Mister-Hope commented 3 months ago

I would like to regard this as a server side bug, as it's not fair in 3rd party themes to do a filtering & remap with the matched elements for theme developers.

The server should try to response the result the way the client ask for. @lizheming

lizheming commented 3 months ago

https://walinejs.comment.lithub.cc/api/article?path=%2Fguide%2Fclient%2Fcount.html%2C%2F%2F%2Cguide%2Fclient%2Fcount.html&type=time&lang=zh-CN

It seems there has no problem with latest server version. Could you check it again with latest version?