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 bug of JSON parse #1503

Merged
merged 44 commits into from
Mar 25, 2025
Merged

Conversation

HaoQiuji-Pavel
Copy link

No description provided.

@HaoQiuji-Pavel
Copy link
Author

@nighca 寒星老师,这个pr修改了上次CodingStep的意见。然后改消费方代码是因为万欣后端传过来的是json字符串,前端需要JSON.parse才能使用

@nighca
Copy link
Collaborator

nighca commented Mar 25, 2025

改消费方代码是因为万欣后端传过来的是json字符串,前端需要JSON.parse才能使用

要看这个 parse 在哪里做。如果我们约定的 backend 模块返回的 step 就是 object 本身而不是对应的 JSON 字符串,那么应当由 backend 模块自己做 parse。可能是在 backend 的 go 代码中,最差也应该在 apis/guidance.ts 中,而不应该是具体消费 step 数据的业务代码中

Copy link

qiniu-x bot commented Mar 25, 2025

[Git-flow] Hi @HaoQiuji-Pavel, There are some suggestions for your information:


Rebase suggestions

Which seems insignificant, recommend to use git rebase command to reorganize your PR.

For other git-flow instructions, recommend refer to these examples.

If you have any questions about this comment, feel free to raise an issue here:

@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.

@HaoQiuji-Pavel
Copy link
Author

@nighca

要看这个 parse 在哪里做。如果我们约定的 backend 模块返回的 step 就是 object 本身而不是对应的 JSON 字符串,那么应当由 backend 模块自己做 parse。可能是在 backend 的 go 代码中,最差也应该在 apis/guidance.ts 中,而不应该是具体消费 step 数据的业务代码中

明白,已修改

@nighca nighca merged commit e902be5 into goplus:trailhead_guidance Mar 25, 2025
5 checks passed
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