Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ocm-engine
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
svdh
ocm-engine
Commits
db0a2a94
Commit
db0a2a94
authored
1 year ago
by
Boyan Tsolov
Browse files
Options
Downloads
Patches
Plain Diff
fix: class validator check type
parent
e7c360d3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#66566
waiting for manual action with stages
in 21 minutes and 23 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libs/askar/src/askar/agent.service.ts
+1
-2
1 addition, 2 deletions
libs/askar/src/askar/agent.service.ts
libs/dtos/src/dtos/requests/proof.req.dto.ts
+4
-4
4 additions, 4 deletions
libs/dtos/src/dtos/requests/proof.req.dto.ts
with
5 additions
and
6 deletions
libs/askar/src/askar/agent.service.ts
+
1
−
2
View file @
db0a2a94
...
...
@@ -410,8 +410,7 @@ export class AgentService {
if
(
acceptProofDto
.
proofUrl
)
{
return
this
.
acceptOobProof
(
acceptProofDto
.
proofUrl
);
}
// REVIEW: should the undefined case be covered inside acceptConnectionProof?
return
this
.
acceptConnectionProof
(
acceptProofDto
.
proofRecordId
as
string
);
return
this
.
acceptConnectionProof
(
acceptProofDto
.
proofRecordId
);
};
acceptOobProof
=
async
(
url
:
string
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
libs/dtos/src/dtos/requests/proof.req.dto.ts
+
4
−
4
View file @
db0a2a94
...
...
@@ -2,13 +2,13 @@ import { IsNotEmpty, IsString, ValidateIf } from "class-validator";
export
class
ProofReqDto
{
@
ValidateIf
((
o
)
=>
o
.
proofUrl
===
undefined
,
{
always
:
true
}
)
@
ValidateIf
((
o
)
=>
o
&&
typeof
o
.
proofUrl
===
'
undefined
'
)
@
IsString
()
@
IsNotEmpty
()
proofRecordId
:
string
|
undefined
;
proofRecordId
:
string
;
@
ValidateIf
((
o
)
=>
o
.
proofRecordId
===
undefined
,
{
always
:
true
}
)
@
ValidateIf
((
o
)
=>
o
&&
typeof
o
.
proofRecordId
===
'
undefined
'
)
@
IsString
()
@
IsNotEmpty
()
proofUrl
:
string
|
undefined
;
proofUrl
:
string
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment