Skip to content

fix: update ResourceTemplate ID to id for consistency across the code…#494

Merged
zxh326 merged 1 commit intokite-org:mainfrom
anupam42:bug/edit-delete-content-480
Apr 19, 2026
Merged

fix: update ResourceTemplate ID to id for consistency across the code…#494
zxh326 merged 1 commit intokite-org:mainfrom
anupam42:bug/edit-delete-content-480

Conversation

@anupam42
Copy link
Copy Markdown
Contributor

Fix ResourceTemplate interface using ID (uppercase) instead of id (lowercase), causing edit and delete operations to always call /admin/templates/undefined.

Why:
The backend GORM Model struct serializes the primary key as json:"id" (lowercase). The frontend ResourceTemplate TypeScript interface declared it as ID: number (uppercase), so editingTemplate.ID and deletingTemplate.ID were always undefined at runtime making PUT and DELETE requests fail silently.

Validation
Renamed ID → id in ResourceTemplate interface and all call sites
Ran pnpm run build (tsc -b && vite build) — zero type errors, clean build
Manual testing against a live cluster recommended before merge

@zxh326 zxh326 enabled auto-merge (squash) April 19, 2026 05:23
@zxh326 zxh326 merged commit 3e2904e into kite-org:main Apr 19, 2026
2 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.

2 participants