Skip to content

Commit

Permalink
chore(server): replace region to regionId in app creating api (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow authored Mar 7, 2023
1 parent 7e81c0b commit c3b39d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions server/src/application/application.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ApplicationService {
where: {
id: dto.bundleId,
region: {
name: dto.region,
id: dto.regionId,
},
},
})
Expand All @@ -45,7 +45,7 @@ export class ApplicationService {
lockedAt: TASK_LOCK_INIT_TIME,
region: {
connect: {
name: dto.region,
id: dto.regionId,
},
},
bundle: {
Expand All @@ -58,7 +58,7 @@ export class ApplicationService {
},
runtime: {
connect: {
name: dto.runtimeName,
id: dto.runtimeId,
},
},
configuration: {
Expand Down
6 changes: 4 additions & 2 deletions server/src/application/dto/create-application.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export class CreateApplicationDto {

@ApiProperty()
@IsNotEmpty()
region: string
@IsString()
regionId: string

@ApiProperty()
@IsNotEmpty()
Expand All @@ -32,7 +33,8 @@ export class CreateApplicationDto {

@ApiProperty()
@IsNotEmpty()
runtimeName: string
@IsString()
runtimeId: string

validate(): string | null {
return null
Expand Down

0 comments on commit c3b39d9

Please sign in to comment.