jesxion 5e03ba3593 fix: guard nullable project_id in getProjectId
After Task 1 changed AuthUser.project_id from number to number | null, getProjectId now explicitly checks for null values and throws an error for platform users attempting to access project resources.

This fix:
- Adds null check to reject platform users (project_id === null)
- Maintains type safety by ensuring return type is always number
- Includes comprehensive unit tests for all scenarios
- Preserves existing project-side behavior for valid project users

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-25 16:52:51 +08:00
2026-04-25 16:23:44 +08:00
2026-04-14 16:53:33 +08:00
Description
郑州智慧工地管理系统 - 后台API+H5+OSS存储
998 KiB
Languages
TypeScript 92.8%
HTML 5%
CSS 2.1%
JavaScript 0.1%