fix: throw error when display id is undefined
parent
61cbbf81ef
commit
762340a72b
|
@ -1,4 +1,10 @@
|
|||
import { Controller, Get, Param, Query } from '@nestjs/common';
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
Param,
|
||||
Query,
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common';
|
||||
import { FilterItemQueueDto } from './dto/filter-item-queue.dto';
|
||||
import { Pagination } from 'src/core/response';
|
||||
import { PaginationResponse } from 'src/core/response/domain/ok-response.interface';
|
||||
|
@ -44,6 +50,7 @@ export class ItemQueueReadController {
|
|||
@Get('display/:id')
|
||||
@Public(true)
|
||||
async detailPublic(@Param('id') id: string): Promise<ItemQueueEntity> {
|
||||
if (!id) throw new UnauthorizedException('id is required');
|
||||
return await this.orchestrator.detail(id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue