Commit 6e110c6
feat: add temporary API to replace enabled/disabled lists (#1789)
## Changes
- Add `PUT
/configurations/latest/handlers/:handlerType/replace-enabled-disabled`
endpoint
- Add `replaceHandlerEnabledDisabled` controller method
- Update tests to include new method and route
- Update package-lock.json with new dependency
## API Details
**Endpoint:** `PUT
/configurations/latest/handlers/:handlerType/replace-enabled-disabled`
**Request Body:**n
{
"enabled": {
"sites": ["site-id-1", "site-id-2"],
"orgs": ["org-id-1"]
},
"disabled": {
"sites": ["site-id-3"],
"orgs": ["org-id-2"]
}
}
Please ensure your pull request adheres to the following guidelines:
- [X] make sure to link the related issues in this description. Or if
there's no issue created, make sure you
describe here the problem you're solving.
- [X] when merging / squashing, make sure the fixed issue references are
visible in the commits, for easy compilation of release notes
Spacecat-shared PR: adobe/spacecat-shared#1328
If the PR is changing the API specification:
- [ ] make sure you add a "Not implemented yet" note the endpoint
description, if the implementation is not ready
yet. Ideally, return a 501 status code with a message explaining the
feature is not implemented yet.
- [ ] make sure you add at least one example of the request and
response.
If the PR is changing the API implementation or an entity exposed
through the API:
- [ ] make sure you update the API specification and the examples to
reflect the changes.
If the PR is introducing a new audit type:
- [ ] make sure you update the API specification with the type, schema
of the audit result and an example
## Related Issues
https://jira.corp.adobe.com/browse/SITES-40312
Thanks for contributing!
---------
Co-authored-by: Tathagat Sharma <ftathagat+adobe@adobe.com>1 parent d7b323f commit 6e110c6
8 files changed
Lines changed: 360 additions & 14 deletions
File tree
- src
- controllers
- routes
- test
- controllers
- routes
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
320 | 404 | | |
321 | 405 | | |
322 | 406 | | |
| |||
430 | 514 | | |
431 | 515 | | |
432 | 516 | | |
| 517 | + | |
433 | 518 | | |
434 | 519 | | |
435 | 520 | | |
| |||
0 commit comments