fix(asset)enable frontend send content to save - #182
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
JuhaoChen666
approved these changes
Aug 12, 2026
Member
|
@cqhasy 解决下冲突,没有问题的话就可以合并了。 |
nighca
removed their request for review
August 14, 2026 00:42
Member
|
@cqhasy 建议同步 main 时尽量用 rebase 而不是 merge:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description
/asset/saveso it accepts caller-suppliedcontentand creates a new immutable content snapshot instead of copying the current asset content.Implementation Approach
contentas a required field inRecordAssetRequestand updated the OpenAPI and generated frontend TypeScript contracts.prototype[].urlanimations[].frames[].urlitems[].tiles[].urllayers[].resource/, preventing image URLs and frontend-local paths from being persisted.asset_contentsrow. Missing ornullcontent is rejected instead of falling back to the current content.Related Issue
Closes #175
Testing
go test ./internal/handler ./internal/router ./internal/repository— passed.go test ./...— passed.pnpm api:check— OpenAPI generation and TypeScript API checks passed.pnpm test— 57 test files and 220 tests passed.pnpm lint— passed.pnpm format:check— passed.pnpm build— TypeScript and Vite production build passed.git diff --check— passed with no whitespace errors.Screenshots or Recordings
Not included. This change affects API persistence behavior and does not modify rendered UI.
Risks and Follow-ups
/asset/savemust now provide a non-nullcontentpayload.components[].textureremains unchanged because its schema is currently unspecified and typed as arbitrary JSON; it should be handled separately if it is defined as an image reference in the future.Checklist