Fix answer response field names for V2 API compatibility

- Change 'answererPeerId' to 'answererId'
- Change 'answerSdp' to 'sdp'
- Add 'topics' field (empty array) for client compatibility

This ensures the server response matches the expected format
in the client's AnsweredOffer interface.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-06 11:37:31 +01:00
parent e7cd90b905
commit ac0e064e34

View File

@@ -535,9 +535,10 @@ export function createApp(storage: Storage, config: Config) {
return c.json({
answers: offers.map(offer => ({
offerId: offer.id,
answererPeerId: offer.answererPeerId,
answerSdp: offer.answerSdp,
answeredAt: offer.answeredAt
answererId: offer.answererPeerId,
sdp: offer.answerSdp,
answeredAt: offer.answeredAt,
topics: [] // V2 doesn't use topics, but client expects this field
}))
}, 200);
} catch (err) {