streamby-core 0.9.18 → 0.9.19
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.
|
@@ -28,17 +28,17 @@ function createStreamByRouter(config) {
|
|
|
28
28
|
res.status(401).json({ logged: false });
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
router.
|
|
31
|
+
router.get('/upload-project-image-url/:id', async (req, res) => {
|
|
32
32
|
try {
|
|
33
33
|
const auth = await config.authProvider(req);
|
|
34
34
|
if (auth.role !== 'admin' && auth.role !== 'editor') {
|
|
35
35
|
return res.status(403).json({ error: 'Permission denied' });
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
37
|
+
const projectId = req.params.id;
|
|
38
|
+
if (!projectId) {
|
|
39
39
|
return res.status(400).json({ error: 'Missing filename, contentType, or projectId' });
|
|
40
40
|
}
|
|
41
|
-
const url = await (0, presign_1.getPresignedProjectImageUrl)(adapter,
|
|
41
|
+
const url = await (0, presign_1.getPresignedProjectImageUrl)(adapter, projectId);
|
|
42
42
|
res.json(url);
|
|
43
43
|
}
|
|
44
44
|
catch (err) {
|