From b20393b8a99667a0713653c5c377903804784d6f Mon Sep 17 00:00:00 2001 From: posimai Date: Wed, 22 Apr 2026 09:46:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(together):=20=E3=83=A1=E3=83=B3=E3=83=90?= =?UTF-8?q?=E3=83=BC=E8=AA=8D=E8=A8=BC=E6=B8=88=E3=81=BF=E3=83=A6=E3=83=BC?= =?UTF-8?q?=E3=82=B6=E3=83=BC=E3=81=AB=20invite=5Fcode=20=E3=82=92?= =?UTF-8?q?=E8=BF=94=E3=81=99=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server.js b/server.js index 76d592cc..f0de19c9 100644 --- a/server.js +++ b/server.js @@ -2769,7 +2769,6 @@ ${excerpt} }); // GET /together/groups/:groupId — グループ情報(メンバーのみ) - // invite_code は JWT 認証済みの場合のみ返す(レガシー ?u= のみでは返さない) 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' }); const username = normalizeTogetherUsername(req.query.u); @@ -2778,9 +2777,7 @@ ${excerpt} if (!(await togetherEnsureMember(pool, res, req.params.groupId, username, jwtUserId))) return; 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: 'グループが見つかりません' }); - const group = result.rows[0]; - if (!jwtUserId) delete group.invite_code; - res.json(group); + res.json(result.rows[0]); } catch (e) { res.status(500).json({ error: 'Internal server error' }); }