-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: topics and comments #170
Conversation
|
倾向于先加私有API,让前端开发者吐槽一下之后再做公开API |
私有API是指什么? |
Codecov Report
@@ Coverage Diff @@
## master #170 +/- ##
==========================================
- Coverage 47.41% 45.26% -2.16%
==========================================
Files 97 101 +4
Lines 5559 6279 +720
==========================================
+ Hits 2636 2842 +206
- Misses 2651 3159 +508
- Partials 272 278 +6
Continue to review full report at Codecov.
|
所以这个分页是按照一级回复来的吗 |
现在是二级回复,不过感觉分页真的是大麻烦,感觉 #53 (comment) 这样是比较合适的,亦或者重新设计数据库结构? |
重新设计数据库不太现实。 bangumi现在的浏览习惯是按照一级回复的时间顺序进行的,能不能看到二级回复只决于一级回复的位置。 感觉直接按照一级回复分页,然后二级回复不分页了,获取到某个一级回复的时候把对应的二级回复全都返回好了。 |
@Ayase-252 觉得如何 |
要不然直接兼容两种模式,时间线和二级回复两种,让用户自己来选择? |
没必要时间线吧 |
时间线可以更快找到最新的回复,方便时间逆序,类似 V2ex,带个回复的对象这样 |
有对应的前端功能再做吧。现在没啥必要 |
如果按现在的,一级评论分页,二级评论不分没啥问题。 |
/ping |
小组的公开ID是个 |
抱歉,发现 gorm/gen 这边还是不要用 |
openapi/private.yaml
Outdated
title: Created At | ||
type: string | ||
format: date-time | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[diff] reported by reviewdog 🐶
|
在handler里面转一下吧,暴露出的API支持小组使用name |
话说你还做吗,不做的话我就自己实现了... |
获取条目全部讨论
GET
/p/subjects/{subject_id}/topics
Query
响应:
获取条目讨论内容
GET
/p/subjects/{subject_id}/topics/{topic_id}
Query
响应:
获取角色讨论内容
GET
/p/characters/{character_id}/comments
Query
响应:
close #67