[RAPID-fix] 방 생성 API camelCase/snake_case 호환 처리

- createRoom 컨트롤러에서 participantIds/type/name (camelCase) fallback 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-30 18:27:45 +09:00
parent 1f01f6425e
commit a47846747c

View File

@@ -19,7 +19,9 @@ class MessengerController {
async createRoom(req: Request, res: Response) {
try {
const user = (req as AuthenticatedRequest).user!;
const { room_type, room_name, participant_ids } = req.body;
const room_type = req.body.room_type ?? req.body.type;
const room_name = req.body.room_name ?? req.body.name;
const participant_ids = req.body.participant_ids ?? req.body.participantIds;
if (!room_type || !participant_ids || !Array.isArray(participant_ids)) {
return res.status(400).json({ success: false, message: 'room_type and participant_ids are required.' });