Commit cfcebf4
authored
add unassign role to consistent updates (#275)
* Enhance Consistent Updates feature with new role unassignment endpoints
- Updated `FactsClient` to support optional query parameters in `build_forward_request` and `send_forward_request` methods, improving flexibility in request handling.
- Added new DELETE endpoints for unassigning user roles and deleting role assignments in the `facts_router`, allowing for better management of user roles with a `return_deleted` query parameter.
- Refactored `forward_request_then_wait_for_update` to accommodate the new query parameters, ensuring consistent behavior across requests.
* Refactor FactsClient methods to remove optional query parameters
- Updated `build_forward_request` and `send_forward_request` methods in `FactsClient` to eliminate the optional `query_params` argument, simplifying the request handling process.
- Adjusted related calls in `facts_router` to align with the new method signatures, ensuring consistent behavior across the application.
* fix pre-commit
* Enhance FactsClient and router with query parameter support
- Updated `FactsClient` methods to accept optional `query_params`, improving flexibility in request handling.
- Introduced a `pre_return_callback` parameter to `convert_response` for custom response processing.
- Modified `facts_router` endpoints to utilize the new query parameter functionality, specifically for handling `return_deleted` logic in user role management.
- Added a utility function to convert 200 responses to 204, enhancing response consistency.
* Refactor FactsClient and router to remove pre_return_callback parameter
- Eliminated the `pre_return_callback` parameter from `convert_response` in `FactsClient`, simplifying response handling.
- Updated `unassign_user_role` and `delete_role_assignment` functions in `facts_router` to remove references to `pre_return_callback`, ensuring consistent response processing.
- Adjusted `forward_request_then_wait_for_update` to align with the new method signature, enhancing clarity and maintainability.
* Refactor query parameter handling in FactsClient
- Updated the `FactsClient` to use a separate variable for merging query parameters, improving code clarity.
- Simplified the request parameter construction by directly using the new variable, enhancing maintainability.1 parent a7b4f2a commit cfcebf4
3 files changed
+75
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
56 | | - | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
| |||
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
65 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
66 | 79 | | |
67 | 80 | | |
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
71 | 84 | | |
72 | | - | |
| 85 | + | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
76 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
77 | 94 | | |
78 | 95 | | |
79 | 96 | | |
| |||
103 | 120 | | |
104 | 121 | | |
105 | 122 | | |
| 123 | + | |
| 124 | + | |
106 | 125 | | |
107 | 126 | | |
108 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
195 | 216 | | |
196 | 217 | | |
197 | 218 | | |
| |||
211 | 232 | | |
212 | 233 | | |
213 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
214 | 255 | | |
215 | 256 | | |
216 | 257 | | |
| |||
293 | 334 | | |
294 | 335 | | |
295 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
296 | 343 | | |
297 | 344 | | |
298 | 345 | | |
| |||
303 | 350 | | |
304 | 351 | | |
305 | 352 | | |
| 353 | + | |
306 | 354 | | |
307 | 355 | | |
308 | | - | |
| 356 | + | |
309 | 357 | | |
310 | 358 | | |
311 | 359 | | |
| |||
0 commit comments