pay
This commit is contained in:
@@ -4,6 +4,7 @@ import { OrdersService } from './orders.service';
|
||||
import { AuthGuard } from '../auth/guards/auth.guard';
|
||||
import { UserId } from '../../common/decorators/user-id.decorator';
|
||||
import { RestId } from 'src/common/decorators/rest-id.decorator';
|
||||
import { AdminAuthGuard } from '../auth/guards/adminAuth.guard';
|
||||
|
||||
@ApiTags('orders')
|
||||
@Controller()
|
||||
@@ -22,8 +23,16 @@ export class OrdersController {
|
||||
@ApiBearerAuth()
|
||||
@Get('public/orders')
|
||||
@ApiOperation({ summary: 'Get all orders' })
|
||||
findAll() {
|
||||
return this.ordersService.findAll();
|
||||
findAll(@RestId() restId: string) {
|
||||
return this.ordersService.findAll(restId);
|
||||
}
|
||||
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Get('admin/orders')
|
||||
@ApiOperation({ summary: 'Get all orders' })
|
||||
findAllAdmin(@RestId() restId: string) {
|
||||
return this.ordersService.findAll(restId);
|
||||
}
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
|
||||
Reference in New Issue
Block a user