improve runtime environment variable modal usability
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { Controller, Delete, Get, Param, Patch, Query, Body } from '@nestjs/common';
|
||||
import { Body, Controller, Delete, Get, Param, Patch, Post, Query } from '@nestjs/common';
|
||||
|
||||
import {
|
||||
ListLauncherSshKeysQuery,
|
||||
CreateDeviceAuthorizationDto,
|
||||
ListDeviceAuthorizationUsersQuery,
|
||||
ListProvisionedDevicesQuery,
|
||||
UpdateProvisionedDeviceDto,
|
||||
} from './dto';
|
||||
@@ -38,4 +40,24 @@ export class AgentsController {
|
||||
removeSshKey(@Param('id') id: string) {
|
||||
return this.agentsService.removeSshKey(id);
|
||||
}
|
||||
|
||||
@Get('registration-users')
|
||||
listRegistrationUsers(@Query() query: ListDeviceAuthorizationUsersQuery) {
|
||||
return this.agentsService.listRegistrationUsers(query);
|
||||
}
|
||||
|
||||
@Get('device-authorizations')
|
||||
listDeviceAuthorizations() {
|
||||
return this.agentsService.listDeviceAuthorizations();
|
||||
}
|
||||
|
||||
@Post('device-authorizations')
|
||||
createDeviceAuthorization(@Body() body: CreateDeviceAuthorizationDto) {
|
||||
return this.agentsService.createDeviceAuthorization(body.userId);
|
||||
}
|
||||
|
||||
@Post('device-authorizations/:id/cancel')
|
||||
cancelDeviceAuthorization(@Param('id') id: string) {
|
||||
return this.agentsService.cancelDeviceAuthorization(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user