fix: regenerate public track data when saving a track as visible
This commit is contained in:
parent
4a119a0fc9
commit
7fec413437
|
@ -18,6 +18,8 @@ services:
|
|||
volumes:
|
||||
- ./src:/opt/obsAPI/src
|
||||
- ./local/api-data:/data
|
||||
- .migrations.js:/opt/obsAPI/.migrations.js
|
||||
- ./migrations:/opt/obsAPI/migrations/
|
||||
environment:
|
||||
- PORT=3000
|
||||
- MONGODB_URL=mongodb://mongo/obsTest
|
||||
|
|
|
@ -248,6 +248,8 @@ router.put(
|
|||
track.uploadedByUserAgent = normalizeUserAgent(req.headers['user-agent']);
|
||||
await track.writeToOriginalFile(fileBody)
|
||||
|
||||
await track.rebuildTrackDataAndSave();
|
||||
} else if (track.visible && !track.publicTrackData) {
|
||||
await track.rebuildTrackDataAndSave();
|
||||
} else {
|
||||
await track.save();
|
||||
|
|
Loading…
Reference in a new issue