Commit 1ad109f
committed
chore: update endpoint to rotate secret key (#7122)
## [Dashboard] Fix: Update Secret Key Rotation API Endpoint
## Notes for the reviewer
This PR updates the secret key rotation functionality to use the new team-based API endpoint structure. The `rotateSecretKeyClient` function now requires both `teamId` and `projectId` parameters, and the API endpoint has been updated to follow the `/v1/teams/{teamId}/projects/{projectId}/rotate-secret-key` pattern.
## How to test
Test the secret key rotation functionality in:
1. Project FTUX
2. Nebula FTUX
3. Project General Settings page
Verify that the secret key can be successfully rotated in all these locations.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Refactor**
- Updated secret key rotation to require both team and project identifiers for enhanced security and context.
- Modified components to include team ID alongside project data, improving integration and user experience in project-related sections.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on updating the handling of project and team identifiers in the `NebulaFTUX` and related components, enhancing the functionality for rotating secret keys by including the `teamId` alongside the `projectId`.
### Detailed summary
- Added `teamId` prop to the `NebulaFTUX` component.
- Passed `teamId` from `NebulaFTUX` to `SecretKeySection`.
- Updated `rotateSecretKeyClient` to accept an object with `teamId` and `projectId`.
- Modified the API call in `rotateSecretKeyClient` to use the new parameters.
- Updated the `SecretKeySection` to handle the new `teamId` prop.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent 376bdb2 commit 1ad109f
File tree
6 files changed
+19
-7
lines changed- apps/dashboard/src
- @3rdweb-sdk/react/hooks
- app/(app)/team/[team_slug]/[project_slug]
- components/ProjectFTUX
- nebula
- settings
6 files changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | | - | |
| 330 | + | |
328 | 331 | | |
329 | | - | |
330 | | - | |
331 | | - | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
0 commit comments