add runtime profile deletion and refine config forms
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-09 14:53:45 +09:00
parent 3a79364905
commit dd09471267
2 changed files with 22 additions and 0 deletions
+5
View File
@@ -206,6 +206,11 @@ export class AppsController {
return this.appsService.createRuntimeProfile(body);
}
@Delete('runtime-profiles/:profileId')
deleteRuntimeProfile(@Param('profileId') profileId: string) {
return this.appsService.deleteRuntimeProfile(profileId);
}
@Post('runtime-profiles/:profileId/variables')
createRuntimeVariable(
@Param('profileId') profileId: string,
+17
View File
@@ -1594,6 +1594,23 @@ export class AppsService {
return { profile };
}
async deleteRuntimeProfile(profileId: string) {
const profile = await this.prisma.runtimeEnvProfile.findUnique({
where: { id: profileId },
select: { id: true, name: true },
});
if (!profile) {
throw new NotFoundException('실행 설정 프로필을 찾을 수 없습니다.');
}
await this.prisma.runtimeEnvProfile.delete({
where: { id: profileId },
});
return { deleted: true, profileId, name: profile.name };
}
async createRuntimeVariable(profileId: string, body: CreateRuntimeEnvVariableDto) {
const profile = await this.prisma.runtimeEnvProfile.findUnique({
where: { id: profileId },