improve logging (#11)
This commit is contained in:
parent
d545b89004
commit
2703da66c8
@ -24,7 +24,7 @@ export class RoomsController {
|
|||||||
@Header('content-type', 'application/octet-stream')
|
@Header('content-type', 'application/octet-stream')
|
||||||
async findOne(@Param() params, @Res() res: Response): Promise<void> {
|
async findOne(@Param() params, @Res() res: Response): Promise<void> {
|
||||||
const data = await this.storageService.get(params.id, this.namespace);
|
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) {
|
if (!data) {
|
||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
@ -38,11 +38,9 @@ export class RoomsController {
|
|||||||
|
|
||||||
@Put(':id')
|
@Put(':id')
|
||||||
async create(@Param() params, @Body() payload: Buffer) {
|
async create(@Param() params, @Body() payload: Buffer) {
|
||||||
console.log(payload)
|
|
||||||
console.log(params)
|
|
||||||
const id = params.id;
|
const id = params.id;
|
||||||
await this.storageService.set(id, payload, this.namespace);
|
await this.storageService.set(id, payload, this.namespace);
|
||||||
this.logger.debug(`Created room ${id}`);
|
this.logger.log(`PUT room ${id}`);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user