bulltrackers-module 1.0.617 → 1.0.618
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -35,6 +35,14 @@ router.post('/auto-generate', async (req, res) => {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
+
// GET /watchlists/public - Must be before /:id route to avoid route conflict
|
|
39
|
+
router.get('/public', async (req, res) => {
|
|
40
|
+
try {
|
|
41
|
+
const data = await fetchPublicWatchlists(req.dependencies.db, req.query.limit, req.query.offset);
|
|
42
|
+
res.json({ success: true, data });
|
|
43
|
+
} catch (e) { res.status(500).json({ error: e.message }); }
|
|
44
|
+
});
|
|
45
|
+
|
|
38
46
|
// GET /watchlists/:id (Rec 12)
|
|
39
47
|
router.get('/:id', async (req, res) => {
|
|
40
48
|
try {
|
|
@@ -86,13 +94,6 @@ router.post('/manage', async (req, res) => {
|
|
|
86
94
|
});
|
|
87
95
|
|
|
88
96
|
// Public & Copy Routes (Existing)
|
|
89
|
-
router.get('/public', async (req, res) => {
|
|
90
|
-
try {
|
|
91
|
-
const data = await fetchPublicWatchlists(req.dependencies.db, req.query.limit, req.query.offset);
|
|
92
|
-
res.json({ success: true, data });
|
|
93
|
-
} catch (e) { res.status(500).json({ error: e.message }); }
|
|
94
|
-
});
|
|
95
|
-
|
|
96
97
|
router.post('/:id/publish', async (req, res) => {
|
|
97
98
|
try {
|
|
98
99
|
const result = await publishWatchlistVersion(req.dependencies.db, req.targetUserId, req.params.id);
|