feat: add addAccountByToken tRPC mutation with upsert logic and tests
Adds a new mutation that accepts an email + raw OAuth token and upserts the account — creating it if it doesn't exist, updating credentials if it does. Covers all four scenarios with unit tests (new, existing, empty-email, empty-token validation).
This commit is contained in:
@@ -190,6 +190,7 @@ Each procedure uses `require*Repository(ctx)` helpers that throw `TRPCError(INTE
|
||||
| updateAccountAuth | mutation | Update credentials |
|
||||
| markAccountExhausted | mutation | Set exhaustion timer |
|
||||
| listProviderNames | query | Available provider names |
|
||||
| addAccountByToken | mutation | Upsert account from OAuth token; returns `{ upserted, account }` |
|
||||
|
||||
### Proposals
|
||||
| Procedure | Type | Description |
|
||||
|
||||
Reference in New Issue
Block a user