mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 14:08:11 +00:00
add permissions and fix issues
This commit is contained in:
@@ -2,7 +2,7 @@ import { Body, Controller, Param, ParseUUIDPipe, Post } from '@nestjs/common';
|
||||
import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { CurrentUser } from '@edr/api-common';
|
||||
|
||||
import { TrainSchedulingManage } from '../../common/booking-guards';
|
||||
import { TrainSchedulingReschedule } from '../../common/booking-guards';
|
||||
import {
|
||||
type AuthUserPayload,
|
||||
resolveAuthUserId,
|
||||
@@ -18,7 +18,7 @@ export class SchedulingRescheduleController {
|
||||
constructor(private readonly schedulingRescheduleService: SchedulingRescheduleService) {}
|
||||
|
||||
@Post('preview')
|
||||
@TrainSchedulingManage()
|
||||
@TrainSchedulingReschedule()
|
||||
@ApiOperation({ summary: 'Preview reschedule / government preempt plan' })
|
||||
preview(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
@@ -28,7 +28,7 @@ export class SchedulingRescheduleController {
|
||||
}
|
||||
|
||||
@Post('execute')
|
||||
@TrainSchedulingManage()
|
||||
@TrainSchedulingReschedule()
|
||||
@ApiOperation({ summary: 'Execute a confirmed reschedule plan' })
|
||||
execute(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
@@ -50,7 +50,7 @@ export class SchedulingMaintenanceController {
|
||||
constructor(private readonly schedulingRescheduleService: SchedulingRescheduleService) {}
|
||||
|
||||
@Post('maintenance')
|
||||
@TrainSchedulingManage()
|
||||
@TrainSchedulingReschedule()
|
||||
@ApiOperation({ summary: 'Reschedule train for maintenance (new departure + rebalance)' })
|
||||
maintenance(
|
||||
@Param('id', ParseUUIDPipe) id: string,
|
||||
|
||||
Reference in New Issue
Block a user