Commit 5875b4c
committed
fix: return JSON object instead of array for empty category restrictions
Empty PHP arrays serialize as JSON [] but the CategoryRestrictions
TypeScript interface expects an object ({[rightId: string]: number[]}).
Use stdClass to ensure {} is returned when there are no restrictions.1 parent e5ad25a commit 5875b4c
1 file changed
Lines changed: 5 additions & 2 deletions
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
0 commit comments