Commit 777f4e7
Fix frontend API calls to use correct endpoint format
Updated PSU and DMM components to use the correct API endpoint format
without set_ and query_ prefixes. The API has smart resolution that
automatically maps:
- GET requests: partial names → query_* methods
- POST requests: partial names → set_* methods
Changes:
- PSU component:
- GET: /voltage instead of /query_voltage
- GET: /current instead of /query_current
- POST: /voltage/{value} instead of /set_voltage/{value}
- POST: /current/{value} instead of /set_current/{value}
- GET: /output_voltage instead of /query_output_voltage
- GET: /output_current instead of /query_output_current
- GET: /output_power instead of /query_output_power
- DMM component:
- POST: /mode/{value} instead of /set_mode/{value}
- GET: /voltage instead of /query_voltage
- GET: /current instead of /query_current
- GET: /power instead of /query_power
This aligns with the API naming convention documented in CLAUDE.md
which prevents arbitrary method execution and enforces the security
model where only query_* and set_* methods are accessible.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 1a00ed7 commit 777f4e7
2 files changed
Lines changed: 15 additions & 15 deletions
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | | - | |
409 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
| 70 | + | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
| 185 | + | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
| 195 | + | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
| 203 | + | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
271 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
0 commit comments