Commit 7ad717c
Improve code consistency: extract URL path constants and add documentation
- Add API path constants for consistent URL construction in agent service
- Replace hardcoded path segments with named constants (devices, posture, certs, etc.)
- Add missing documentation to inventory Server type
- Improve maintainability by centralizing URL path definitions
Constants added:
- pathDevices, pathPosture, pathCerts, pathDevice, pathCA
- Consistent usage across updatePosture, registerDevice, obtainCertificate, downloadCA functions
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-5be4213f-26eb-400c-bb7b-d4c79b7ee6fe1 parent 400acd1 commit 7ad717c
File tree
2 files changed
+12
-4
lines changed- agent/internal/service
- services/inventory/server
2 files changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
274 | | - | |
| 281 | + | |
275 | 282 | | |
276 | 283 | | |
277 | 284 | | |
| |||
296 | 303 | | |
297 | 304 | | |
298 | 305 | | |
299 | | - | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| |||
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
333 | | - | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
372 | 379 | | |
373 | 380 | | |
374 | 381 | | |
375 | | - | |
| 382 | + | |
376 | 383 | | |
377 | 384 | | |
378 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
0 commit comments