Skip to content

feat(api): add create_round_combined endpoint with structured status …#538

Open
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:feat/create-round-combined-endpoint
Open

feat(api): add create_round_combined endpoint with structured status …#538
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:feat/create-round-combined-endpoint

Conversation

@ayushshukla1807
Copy link
Copy Markdown

Closes #447.

The existing add_round endpoint raises HTTP 400 on the "already active
round" case, which is valid input -- not a server error.

The frontend can't reliably detect success vs rollback without parsing raw error strings.

This new endpoint at /admin/campaign//create_round_combined always
returns HTTP 200 with a typed body:
{ "status": "created" | "failed", "round": {...} | null, "reason": null | str }

Frontend can now check data.status === 'created' for clean
success/rollback branch handling -- no more string parsing.

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.

First round creation without images succeeds with zero entries, blocking subsequent round creation

1 participant