streamby-core 0.10.10 → 0.10.11

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.
@@ -135,9 +135,16 @@ function createStreamByRouter(config) {
135
135
  }
136
136
  const projectId = req.params.id;
137
137
  const updates = req.body;
138
+ const project = await config.projectProvider.getById(projectId);
139
+ if (!project) {
140
+ return res.status(404).json({ error: 'Project not found' });
141
+ }
138
142
  if (!updates || typeof updates !== 'object') {
139
143
  return res.status(400).json({ error: 'Missing updates payload' });
140
144
  }
145
+ if (!isProjectMember(project, auth.userId)) {
146
+ return res.status(403).json({ error: 'Unauthorized project access' });
147
+ }
141
148
  const updated = await config.projectProvider.update(projectId, updates);
142
149
  res.status(200).json({ success: true, project: updated });
143
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.10.10",
3
+ "version": "0.10.11",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",