Browse Source
Feature/validate url in create and update platform dto (#3235)
* Validate url
* Update changelog
pull/3236/head^2
Thomas Kaul
12 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
14 additions and
4 deletions
-
CHANGELOG.md
-
apps/api/src/app/platform/create-platform.dto.ts
-
apps/api/src/app/platform/update-platform.dto.ts
|
|
@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
- Added support to override the asset sub class of an asset profile in the asset profile details dialog of the admin control |
|
|
|
- Added support to override the url of an asset profile in the asset profile details dialog of the admin control |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Improved the url validation in the create and update platform endpoint |
|
|
|
|
|
|
|
## 2.70.0 - 2024-04-02 |
|
|
|
|
|
|
|
### Added |
|
|
|
|
|
@ -1,9 +1,12 @@ |
|
|
|
import { IsString } from 'class-validator'; |
|
|
|
import { IsString, IsUrl } from 'class-validator'; |
|
|
|
|
|
|
|
export class CreatePlatformDto { |
|
|
|
@IsString() |
|
|
|
name: string; |
|
|
|
|
|
|
|
@IsString() |
|
|
|
@IsUrl({ |
|
|
|
protocols: ['https'], |
|
|
|
require_protocol: true |
|
|
|
}) |
|
|
|
url: string; |
|
|
|
} |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { IsString } from 'class-validator'; |
|
|
|
import { IsString, IsUrl } from 'class-validator'; |
|
|
|
|
|
|
|
export class UpdatePlatformDto { |
|
|
|
@IsString() |
|
|
@ -7,6 +7,9 @@ export class UpdatePlatformDto { |
|
|
|
@IsString() |
|
|
|
name: string; |
|
|
|
|
|
|
|
@IsString() |
|
|
|
@IsUrl({ |
|
|
|
protocols: ['https'], |
|
|
|
require_protocol: true |
|
|
|
}) |
|
|
|
url: string; |
|
|
|
} |
|
|
|