Skip to content

feat: add /api/accounts endpoints for account management#152

Merged
sweetmantech merged 2 commits intotestfrom
sweetmantech/myc-4008-api-apiaccount-endpoints-from-recoup-chat
Jan 22, 2026
Merged

feat: add /api/accounts endpoints for account management#152
sweetmantech merged 2 commits intotestfrom
sweetmantech/myc-4008-api-apiaccount-endpoints-from-recoup-chat

Conversation

@sweetmantech
Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Run pnpm build to verify compilation
  • Run pnpm test to verify all tests pass
  • Test POST /api/accounts with email to create new account
  • Test POST /api/accounts with existing email to retrieve account
  • Test PATCH /api/accounts to update account name
  • Test POST /api/accounts/artists to add artist association

🤖 Generated with Claude Code

Migrate account endpoints from Recoup-Chat to Recoup-API:
- POST /api/accounts - Create or retrieve account by email/wallet
- PATCH /api/accounts - Update account profile information
- POST /api/accounts/artists - Add artist to account

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
recoup-api Ready Ready Preview Jan 22, 2026 6:47pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 22, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 22, 2026

Braintrust eval report

Catalog Opportunity Analysis Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
Catalog_availability 29.9% (+26pp) 3 🟢 1 🔴
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 45.22s (+10.01s) 1 🟢 4 🔴

Catalog Songs Count Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
AnswerCorrectness 19.3% (+0pp) 3 🟢 -
Factuality 33.3% (-33pp) - 1 🔴
Llm_calls 4 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 13.13s (+0.26s) 2 🟢 1 🔴

First Week Album Sales Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
Factuality 40% (-10pp) - 1 🔴
Llm_calls 1 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 14.98s (+2.58s) 1 🟢 3 🔴

Memory & Storage Tools Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
Tools_called 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 16.99s (+3.64s) - 1 🔴

Monthly Listeners Tracking Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
AnswerSimilarity 77.7% (+1pp) 3 🟢 2 🔴
Llm_calls 2 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 12.51s (-2.75s) 5 🟢 -

Search Web Tool Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
AnswerCorrectness 27.3% (+2pp) 7 🟢 4 🔴
Llm_calls 3 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 26.97s (+1.83s) 5 🟢 6 🔴

Social Scraping Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
Tools_called 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 24.78s (+2.12s) 2 🟢 4 🔴

Spotify Followers Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
AnswerCorrectness 20.4% (0pp) 2 🟢 3 🔴
Llm_calls 3 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 14.41s (+0.67s) 2 🟢 3 🔴

Spotify Tools Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
Tools_called 0% (+0pp) - -
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 33.9s (+1.33s) 1 🟢 1 🔴

TikTok Analytics Questions Evaluation (HEAD-1769107597)

Score Average Improvements Regressions
Question_answered 0% (-5pp) - 1 🔴
Llm_calls 0 (+0) - -
Tool_calls 0 (+0) - -
Errors 0 (+0) - -
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 0tok (+0tok) - -
Prompt_cached_tokens 0tok (+0tok) - -
Prompt_cache_creation_tokens 0tok (+0tok) - -
Completion_tokens 0tok (+0tok) - -
Completion_reasoning_tokens 0tok (+0tok) - -
Total_tokens 0tok (+0tok) - -
Duration 15.22s (-0.51s) 1 🟢 1 🔴

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
export const createAccountBodySchema = z.object({
email: z.string().email("email must be a valid email address").optional(),
wallet: z.string().min(1, "wallet cannot be empty").optional(),
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
});
}).refine(
(data) => data.email || data.wallet,
"At least one of email or wallet must be provided"
);

Validation schema allows creating accounts with neither email nor wallet, resulting in orphaned and inaccessible accounts

Fix on Vercel

@sweetmantech sweetmantech merged commit 26d2104 into test Jan 22, 2026
5 checks passed
@sweetmantech sweetmantech deleted the sweetmantech/myc-4008-api-apiaccount-endpoints-from-recoup-chat branch January 22, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant