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 project page game content #1034

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Fix project page game content #1034

merged 1 commit into from
Oct 25, 2024

Conversation

nighca
Copy link
Collaborator

@nighca nighca commented Oct 25, 2024

update #1033. Fix:

  1. Prefer released game content (& thumbnail) in project page

@qiniu-ci
Copy link

This PR has been deployed to the preview environment. You can explore it using the preview URL.

Warning

Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team.

@@ -116,6 +117,7 @@ export type ListProjectParams = PaginationParams & {
}

export async function listProject(params?: ListProjectParams) {
// TODO: released thumbnail for project list
Copy link
Collaborator Author

@nighca nighca Oct 25, 2024

Choose a reason for hiding this comment

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

这里如果针对结果中的每个 project 都去 getLatestRelease,可能有性能问题,晚点再细想一下;可能可以给 db project 表加个字段比如 releasedThumbnail(在每次 publish 的时候去更新)?

Copy link
Member

@aofei aofei Oct 25, 2024

Choose a reason for hiding this comment

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

有个可能会常见一些的做法是,db 加个 project.latest_release_id,对应到 api 是 Project.latestRelease(值是个 ProjectRelease model)

另外这样上面通过 listReleases 来获取最新 release 的方法也就不需要了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

嗯这样更自然一些

@@ -116,6 +117,7 @@ export type ListProjectParams = PaginationParams & {
}

export async function listProject(params?: ListProjectParams) {
// TODO: released thumbnail for project list
Copy link
Member

@aofei aofei Oct 25, 2024

Choose a reason for hiding this comment

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

有个可能会常见一些的做法是,db 加个 project.latest_release_id,对应到 api 是 Project.latestRelease(值是个 ProjectRelease model)

另外这样上面通过 listReleases 来获取最新 release 的方法也就不需要了

@nighca nighca merged commit d7f7565 into goplus:dev Oct 25, 2024
4 checks passed
nighca added a commit that referenced this pull request Oct 25, 2024
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.

3 participants