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

feat: add API for PersonCollect #561

Merged
merged 13 commits into from
May 22, 2024
Merged

Conversation

everpcpc
Copy link
Contributor

No description provided.

@everpcpc everpcpc changed the title feat: add model for PersonCollect feat: add API for PersonCollect May 16, 2024
cmd/gen/gorm/main.go Outdated Show resolved Hide resolved
cmd/gen/gorm/main.go Outdated Show resolved Hide resolved
@trim21
Copy link
Contributor

trim21 commented May 16, 2024

看样子是OK了

@pull-request-size pull-request-size bot added size/L and removed size/S labels May 17, 2024
@everpcpc everpcpc force-pushed the feat-person-collects branch 4 times, most recently from 75b9dc2 to 41cb287 Compare May 17, 2024 14:28
@everpcpc everpcpc force-pushed the feat-person-collects branch 3 times, most recently from dc7eede to f57df13 Compare May 17, 2024 16:45
@everpcpc everpcpc marked this pull request as ready for review May 18, 2024 03:25
@everpcpc everpcpc requested a review from trim21 May 18, 2024 03:25
web/routes.go Outdated
v0.GET("/characters/:id", characterHandler.Get)
v0.GET("/characters/:id/image", characterHandler.GetImage)
v0.GET("/characters/:id/subjects", characterHandler.GetRelatedSubjects)
v0.GET("/characters/:id/persons", characterHandler.GetRelatedPersons)
v0.POST("/characters/:id/collect", characterHandler.CollectCharacter, mw.NeedLogin)
v0.DELETE("/characters/:id/collect", characterHandler.UncollectCharacter, mw.NeedLogin)
Copy link
Contributor

Choose a reason for hiding this comment

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

跟条目收藏的URL风格不太统一啊

Copy link
Contributor Author

Choose a reason for hiding this comment

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

因为条目收藏的 URL 里没有 subjects 字样,不太好加别的,只能跟 index 收藏的 URL 风格统一了 TAT

Copy link
Contributor

Choose a reason for hiding this comment

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

这么一说确实。。。。。

@trim21
Copy link
Contributor

trim21 commented May 18, 2024

需要哪几个表的权限

@everpcpc
Copy link
Contributor Author

应该只需要 chii_person_collects 一个就可以了

@trim21
Copy link
Contributor

trim21 commented May 18, 2024

增删改吗

@everpcpc
Copy link
Contributor Author

everpcpc commented May 18, 2024

只有增删查,这个表应该没有改的操作

@everpcpc everpcpc force-pushed the feat-person-collects branch 4 times, most recently from 2e4d456 to 4a3ffee Compare May 22, 2024 13:03
@trim21
Copy link
Contributor

trim21 commented May 22, 2024

要不先把删的API屏蔽掉吧,后面改好了再启用。先把增和改的上线

@everpcpc
Copy link
Contributor Author

这种没有改操作的也要软删除吗 TAT

@trim21
Copy link
Contributor

trim21 commented May 22, 2024

这种没有改操作的也要软删除吗 TAT

v0.DELETE("/persons/:id/collect", personHandler.UncollectPerson, mw.NeedLogin) 这些

web/routes.go Outdated Show resolved Hide resolved
web/routes.go Outdated Show resolved Hide resolved
@trim21
Copy link
Contributor

trim21 commented May 22, 2024

测试挂了

@trim21 trim21 merged commit a2dd226 into bangumi:master May 22, 2024
6 checks passed
@everpcpc everpcpc deleted the feat-person-collects branch May 22, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants