Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
services
organizations
Commits
61d58908
Commit
61d58908
authored
Nov 28, 2019
by
FORESTIER Fabien
Browse files
Fix validation on links
parent
d56f2dda
Pipeline
#2352
passed with stages
in 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/links/link.dto.ts
View file @
61d58908
import
{
ApiModelProperty
,
ApiModelPropertyOptional
}
from
'
@nestjs/swagger
'
;
import
{
IsOptional
,
IsString
,
MaxLength
}
from
'
class-validator
'
;
export
class
Link
{
@
ApiModelPropertyOptional
()
@
IsOptional
()
@
MaxLength
(
100
)
@
IsString
()
name
?:
string
;
@
ApiModelProperty
()
@
MaxLength
(
300
)
@
IsString
()
url
:
string
;
}
\ No newline at end of file
src/links/link.entity.ts
View file @
61d58908
...
...
@@ -22,7 +22,6 @@ export class LinkEntity {
url
:
string
;
@
Column
({
nullable
:
true
})
@
IsOptional
()
@
ApiModelProperty
()
organizationId
:
number
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment