streamby-core 0.9.5 → 0.9.6
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.
|
@@ -104,5 +104,15 @@ function createStreamByRouter(config) {
|
|
|
104
104
|
res.status(500).json({ error: 'Failed to create project', details: err.message });
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
+
router.get('/projects', async (req, res) => {
|
|
108
|
+
try {
|
|
109
|
+
const auth = await config.authProvider(req);
|
|
110
|
+
const projects = await config.projectProvider.list(auth.userId);
|
|
111
|
+
res.json({ projects });
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
res.status(500).json({ error: 'Failed to list projects', details: err });
|
|
115
|
+
}
|
|
116
|
+
});
|
|
107
117
|
return router;
|
|
108
118
|
}
|