Remove backwards compatibility for API responses
- Clean up all backward compatibility checks for old API format - All endpoints now consistently return { success: true, data: [...] } - Simplify response handling across all components and pages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
423897d1bf
commit
8c2de2c66b
5 changed files with 7 additions and 17 deletions
|
@ -40,9 +40,8 @@ export default function AddStream() {
|
|||
const teamsData = await teamsResponse.json();
|
||||
const streamsData = await streamsResponse.json();
|
||||
|
||||
// Handle both old and new API response formats
|
||||
const teams = teamsData.success ? teamsData.data : teamsData;
|
||||
const streams = streamsData.success ? streamsData.data : streamsData;
|
||||
const teams = teamsData.data;
|
||||
const streams = streamsData.data;
|
||||
|
||||
// Map the API data to the format required by the Dropdown
|
||||
setTeams(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue