fix(together): include invite_code in GET /together/groups/:id response
Was accidentally excluded from SELECT, causing invite code to disappear in the settings panel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
96f22b6a82
commit
925638250b
|
|
@ -2591,7 +2591,7 @@ ${excerpt}
|
|||
r.get('/together/groups/:groupId', async (req, res) => {
|
||||
if (!/^[a-zA-Z0-9_-]+$/.test(req.params.groupId)) return res.status(400).json({ error: 'invalid groupId' });
|
||||
try {
|
||||
const result = await pool.query('SELECT id, name, created_at FROM together_groups WHERE id=$1', [req.params.groupId]);
|
||||
const result = await pool.query('SELECT id, name, invite_code, created_at FROM together_groups WHERE id=$1', [req.params.groupId]);
|
||||
if (result.rows.length === 0) return res.status(404).json({ error: 'グループが見つかりません' });
|
||||
res.json(result.rows[0]);
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue