streamby-core 0.10.7 → 0.10.9
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.
|
@@ -147,15 +147,6 @@ function createStreamByRouter(config) {
|
|
|
147
147
|
});
|
|
148
148
|
router.delete('/projects/:id', async (req, res) => {
|
|
149
149
|
try {
|
|
150
|
-
const auth = await config.authProvider(req);
|
|
151
|
-
const projectId = req.params.id;
|
|
152
|
-
const project = await config.projectProvider.getById(projectId);
|
|
153
|
-
if (!project) {
|
|
154
|
-
return res.status(404).json({ error: 'Project not found' });
|
|
155
|
-
}
|
|
156
|
-
if (!isProjectMember(project, auth.userId)) {
|
|
157
|
-
return res.status(403).json({ error: 'Unauthorized project access' });
|
|
158
|
-
}
|
|
159
150
|
await (0, project_1.deleteProjectService)(req, config.authProvider, config.projectProvider);
|
|
160
151
|
res.status(200).json({ success: true });
|
|
161
152
|
}
|