ソースを参照

Fix trackType missing from directory contents endpoint

GET /api/directories/:id was not including trackType in the track
attributes, causing: edit modal always showing "unset", type emoji
not appearing in the file list for tracks inside folders, and
incidentally clearing saved types when saving the edit form.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
k4be 7 時間 前
コミット
ba55604528
1 ファイル変更1 行追加1 行削除
  1. 1 1
      gpx-vis-backend/src/routes/directories.js

+ 1 - 1
gpx-vis-backend/src/routes/directories.js

@@ -31,7 +31,7 @@ router.get('/:id', requireAuth, async (req, res) => {
     const tracks = await Track.findAll({
       where: { directoryId: dir.id, userId: req.user.id },
       order: [['trackDate', 'DESC'], ['uploadDate', 'DESC']],
-      attributes: ['id', 'name', 'originalFilename', 'uploadDate', 'trackDate', 'pointCount', 'totalDistance'],
+      attributes: ['id', 'name', 'originalFilename', 'uploadDate', 'trackDate', 'pointCount', 'totalDistance', 'trackType'],
     });
 
     res.json({ ...dir.toJSON(), children, tracks });