fix(15): use correct parameter name for chat API (music_session)

Backend's check_session filter expects 'music_session' parameter:
  @music_session = ActiveMusicSession.find(params[:music_session])

But we were sending 'session_id', causing ActiveMusicSession.find(nil)
to fail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Nuwan 2026-02-06 16:34:36 +05:30
parent fce74152f8
commit e24c655905
1 changed files with 2 additions and 1 deletions

View File

@ -963,7 +963,8 @@ export const openMetronome = options => {
*/
export const getChatMessages = async ({ channel, sessionId, before }) => {
const params = new URLSearchParams({ channel });
if (sessionId) params.append('session_id', sessionId);
// Backend expects 'music_session' not 'session_id'
if (sessionId) params.append('music_session', sessionId);
if (before !== undefined) params.append('before', before);
const baseUrl = process.env.REACT_APP_API_BASE_URL;