init studio admin backend

This commit is contained in:
2026-07-01 17:30:04 +09:00
commit 4437d9980d
144 changed files with 44964 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import { Controller, Delete, Get, Param, Patch, Query, Body } from '@nestjs/common';
import {
ListLauncherSshKeysQuery,
ListProvisionedDevicesQuery,
UpdateProvisionedDeviceDto,
} from './dto';
import { AgentsService } from './agents.service';
@Controller('agents')
export class AgentsController {
constructor(private readonly agentsService: AgentsService) {}
@Get('devices')
listDevices(@Query() query: ListProvisionedDevicesQuery) {
return this.agentsService.listDevices(query);
}
@Get('devices/:id')
getDevice(@Param('id') id: string) {
return this.agentsService.getDevice(id);
}
@Patch('devices/:id')
updateDevice(
@Param('id') id: string,
@Body() body: UpdateProvisionedDeviceDto,
) {
return this.agentsService.updateDevice(id, body);
}
@Get('ssh-keys')
listSshKeys(@Query() query: ListLauncherSshKeysQuery) {
return this.agentsService.listSshKeys(query);
}
@Delete('ssh-keys/:id')
removeSshKey(@Param('id') id: string) {
return this.agentsService.removeSshKey(id);
}
}