feat: add support for collabs room
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
Header,
|
||||
InternalServerErrorException,
|
||||
Logger,
|
||||
NotFoundException,
|
||||
Param,
|
||||
Post,
|
||||
Res,
|
||||
@ -14,7 +15,7 @@ import { StorageNamespace, StorageService } from 'src/storage/storage.service';
|
||||
import { Readable } from 'stream';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
@Controller()
|
||||
@Controller('scenes')
|
||||
export class ScenesController {
|
||||
private readonly logger = new Logger(ScenesController.name);
|
||||
namespace = StorageNamespace.SCENES;
|
||||
@ -26,6 +27,10 @@ export class ScenesController {
|
||||
const data = await this.storageService.get(params.id, this.namespace);
|
||||
this.logger.debug(`Get scene ${params.id}`);
|
||||
|
||||
if (!data) {
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
const stream = new Readable();
|
||||
stream.push(data);
|
||||
stream.push(null);
|
||||
|
Reference in New Issue
Block a user