fix : resolve runtime errors and improve configuration
- Add explicit imports for useClientService/useProjectService (not auto-imported from services/) - Fix AppDrawer v-if placement on Teleport to avoid slot warning - Add json format support in API Platform config (415 fix) - Support both hydra:member and member keys in extractHydraMembers - Add Vite/Nitro dev proxy for API calls - Update CLAUDE.md with full project documentation - Use tertiary-500 background for project cards Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
export type HydraCollection<T> = {
|
||||
'hydra:member': T[]
|
||||
'hydra:totalItems': number
|
||||
'hydra:member'?: T[]
|
||||
'hydra:totalItems'?: number
|
||||
'member'?: T[]
|
||||
'totalItems'?: number
|
||||
}
|
||||
|
||||
export function extractHydraMembers<T>(response: HydraCollection<T>): T[] {
|
||||
return response['hydra:member'] ?? []
|
||||
return response['hydra:member'] ?? response['member'] ?? []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user