mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 09:13:14 +03:00
refactor(server): auth route metadata (#9344)
This commit is contained in:
@@ -6,16 +6,17 @@ import { JobService } from 'src/services/job.service';
|
||||
|
||||
@ApiTags('Job')
|
||||
@Controller('jobs')
|
||||
@Authenticated({ admin: true })
|
||||
export class JobController {
|
||||
constructor(private service: JobService) {}
|
||||
|
||||
@Get()
|
||||
@Authenticated({ admin: true })
|
||||
getAllJobsStatus(): Promise<AllJobStatusResponseDto> {
|
||||
return this.service.getAllJobsStatus();
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
@Authenticated({ admin: true })
|
||||
sendJobCommand(@Param() { id }: JobIdParamDto, @Body() dto: JobCommandDto): Promise<JobStatusDto> {
|
||||
return this.service.handleCommand(id, dto);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user