fix: live endpoint
This commit is contained in:
parent
bbc007bccd
commit
3e3f15cd9c
|
|
@ -86,9 +86,9 @@ liveRouter.get(
|
|||
const storageService = await StorageFactory.getInstance();
|
||||
|
||||
// Parse storage key to get components
|
||||
// Format: orgId/projectId/category/year-month/filename.ext
|
||||
// Format: orgId/projectId/category/filename.ext
|
||||
const keyParts = image.storageKey.split('/');
|
||||
if (keyParts.length < 5) {
|
||||
if (keyParts.length < 4) {
|
||||
throw new Error('Invalid storage key format');
|
||||
}
|
||||
|
||||
|
|
@ -153,8 +153,9 @@ liveRouter.get(
|
|||
// Download newly generated image
|
||||
const storageService = await StorageFactory.getInstance();
|
||||
|
||||
// Format: orgId/projectId/category/filename.ext
|
||||
const keyParts = generation.outputImage.storageKey.split('/');
|
||||
if (keyParts.length < 5) {
|
||||
if (keyParts.length < 4) {
|
||||
throw new Error('Invalid storage key format');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue