improve logging (#11)

This commit is contained in:
JannikStreek 2024-02-13 09:22:30 +01:00 committed by GitHub
parent d545b89004
commit 2703da66c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ export class RoomsController {
@Header('content-type', 'application/octet-stream')
async findOne(@Param() params, @Res() res: Response): Promise<void> {
const data = await this.storageService.get(params.id, this.namespace);
this.logger.debug(`Get room ${params.id}`);
this.logger.log(`Get room ${params.id}`);
if (!data) {
throw new NotFoundException();
@ -38,11 +38,9 @@ export class RoomsController {
@Put(':id')
async create(@Param() params, @Body() payload: Buffer) {
console.log(payload)
console.log(params)
const id = params.id;
await this.storageService.set(id, payload, this.namespace);
this.logger.debug(`Created room ${id}`);
this.logger.log(`PUT room ${id}`);
return {
id,