brave / ads-ui

Self-service ads UI
Mozilla Public License 2.0
23 stars 11 forks source link

fix: switch update profile call to "update self" #1291

Closed tackley closed 1 month ago

tackley commented 1 month ago

Resolves https://github.com/brave/ads-ui/issues/1293

For simplicitly, use the new API to "update the current user" rather than explicitly specify the user id to update.

github-actions[bot] commented 1 month ago

[puLL-Merge] - brave/ads-ui@1291

Description

This PR updates the user management functionality in the ads-ui repository. It replaces the UpdateUser mutation with a new UpdateCurrentUser mutation, simplifies the user update process, and removes some deprecated creative-related mutations.

Changes ### Changes 1. src/graphql-client/gql.ts: - Removed `UpdateUser` mutation - Added `UpdateCurrentUser` mutation - Removed deprecated creative-related mutations (`createInPageCreative`, `createNewTabPageCreative`, `createNotificationCreative`, `updateNotificationCreative`) 2. src/graphql-client/graphql.ts: - Updated type definitions to reflect changes in the GraphQL schema - Removed `Webhook` related fields and inputs - Added `AdsManagerUpdateCampaign` and `AdsManagerUpdateCampaignState` mutations - Removed deprecated creative-related mutations and inputs 3. src/graphql/ads-serve.graphql.schema.json: - Updated schema to reflect changes in mutations and types - Removed `Webhook` related types and fields - Added new `AdsManager` related input types and mutations 4. src/graphql/user.graphql: - Removed `UpdateUser` mutation 5. src/user/settings/UserForm.tsx: - Replaced `UpdateUser` mutation with `UpdateCurrentUser` - Updated mutation call to use the new input type (`UpdateCurrentUserInput`) - Removed `id` field from the mutation input

Possible Issues

Security Hotspots

None identified. The changes appear to be refactoring existing functionality rather than introducing new security-sensitive features.