Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nicot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
nicot
Commits
3cf12bc9
Commit
3cf12bc9
authored
Jan 14, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pipe conflict
parent
a6a229ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
21 deletions
+24
-21
src/decorators/pipes.ts
src/decorators/pipes.ts
+21
-18
src/decorators/restful.ts
src/decorators/restful.ts
+3
-3
No files found.
src/decorators/pipes.ts
View file @
3cf12bc9
import
{
ValidationPipe
}
from
'
@nestjs/common
'
;
import
{
ValidationPipe
}
from
'
@nestjs/common
'
;
export
const
CreatePipe
=
new
ValidationPipe
({
export
const
CreatePipe
=
()
=>
transform
:
true
,
new
ValidationPipe
({
transformOptions
:
{
groups
:
[
'
c
'
],
enableImplicitConversion
:
true
},
transform
:
true
,
});
transformOptions
:
{
groups
:
[
'
c
'
],
enableImplicitConversion
:
true
},
});
export
const
GetPipe
=
new
ValidationPipe
({
export
const
GetPipe
=
()
=>
transform
:
true
,
new
ValidationPipe
({
transformOptions
:
{
groups
:
[
'
r
'
],
enableImplicitConversion
:
true
},
transform
:
true
,
skipMissingProperties
:
true
,
transformOptions
:
{
groups
:
[
'
r
'
],
enableImplicitConversion
:
true
},
skipNullProperties
:
true
,
skipMissingProperties
:
true
,
skipUndefinedProperties
:
true
,
skipNullProperties
:
true
,
});
skipUndefinedProperties
:
true
,
});
export
const
UpdatePipe
=
new
ValidationPipe
({
export
const
UpdatePipe
=
()
=>
transform
:
true
,
new
ValidationPipe
({
transformOptions
:
{
groups
:
[
'
u
'
],
enableImplicitConversion
:
true
},
transform
:
true
,
skipMissingProperties
:
true
,
transformOptions
:
{
groups
:
[
'
u
'
],
enableImplicitConversion
:
true
},
skipNullProperties
:
true
,
skipMissingProperties
:
true
,
skipUndefinedProperties
:
true
,
skipNullProperties
:
true
,
});
skipUndefinedProperties
:
true
,
});
src/decorators/restful.ts
View file @
3cf12bc9
...
@@ -89,7 +89,7 @@ export class RestfulFactory<T> {
...
@@ -89,7 +89,7 @@ export class RestfulFactory<T> {
}
}
createParam
()
{
createParam
()
{
return
Body
(
CreatePipe
);
return
Body
(
CreatePipe
()
);
}
}
findOne
(
extras
:
Partial
<
OperationObject
>
=
{}):
MethodDecorator
{
findOne
(
extras
:
Partial
<
OperationObject
>
=
{}):
MethodDecorator
{
...
@@ -121,7 +121,7 @@ export class RestfulFactory<T> {
...
@@ -121,7 +121,7 @@ export class RestfulFactory<T> {
}
}
findAllParam
()
{
findAllParam
()
{
return
Query
(
GetPipe
);
return
Query
(
GetPipe
()
);
}
}
update
(
extras
:
Partial
<
OperationObject
>
=
{}):
MethodDecorator
{
update
(
extras
:
Partial
<
OperationObject
>
=
{}):
MethodDecorator
{
...
@@ -138,7 +138,7 @@ export class RestfulFactory<T> {
...
@@ -138,7 +138,7 @@ export class RestfulFactory<T> {
}
}
updateParam
()
{
updateParam
()
{
return
Body
(
UpdatePipe
);
return
Body
(
UpdatePipe
()
);
}
}
delete
(
extras
:
Partial
<
OperationObject
>
=
{}):
MethodDecorator
{
delete
(
extras
:
Partial
<
OperationObject
>
=
{}):
MethodDecorator
{
...
...
Write
Preview
Markdown
is supported
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