Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoBackendAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
Backend
DojoBackendAPI
Commits
44b06507
Commit
44b06507
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
Update shared
parent
d1833b92
No related branches found
No related tags found
No related merge requests found
Pipeline
#28936
passed
1 year ago
Stage: code_quality
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ExpressAPI/src/helpers/DojoValidators.ts
+3
-2
3 additions, 2 deletions
ExpressAPI/src/helpers/DojoValidators.ts
ExpressAPI/src/shared
+1
-1
1 addition, 1 deletion
ExpressAPI/src/shared
with
4 additions
and
3 deletions
ExpressAPI/src/helpers/DojoValidators.ts
+
3
−
2
View file @
44b06507
...
@@ -4,8 +4,9 @@ import { CustomValidator, ErrorMessage, FieldMessageFactory, Meta } from 'expres
...
@@ -4,8 +4,9 @@ import { CustomValidator, ErrorMessage, FieldMessageFactory, Meta } from 'expres
import
{
BailOptions
,
ValidationChain
}
from
'
express-validator/src/chain
'
;
import
{
BailOptions
,
ValidationChain
}
from
'
express-validator/src/chain
'
;
import
GitlabManager
from
'
../managers/GitlabManager
'
;
import
GitlabManager
from
'
../managers/GitlabManager
'
;
import
express
from
'
express
'
;
import
express
from
'
express
'
;
import
SharedExerciseHelper
from
'
../shared/helpers/Dojo/SharedExerciseHelper
'
;
import
logger
from
'
../shared/logging/WinstonLogger
'
;
import
logger
from
'
../shared/logging/WinstonLogger
'
;
import
Json5FileValidator
from
'
../shared/helpers/Json5FileValidator
'
;
import
ExerciseResultsFile
from
'
../shared/types/Dojo/ExerciseResultsFile
'
;
declare
type
DojoMeta
=
Meta
&
{
declare
type
DojoMeta
=
Meta
&
{
...
@@ -98,7 +99,7 @@ class DojoValidators {
...
@@ -98,7 +99,7 @@ class DojoValidators {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
results
=
this
.
getParamValue
(
req
,
path
)
as
string
;
const
results
=
this
.
getParamValue
(
req
,
path
)
as
string
;
if
(
results
)
{
if
(
results
)
{
SharedExerciseHelper
.
validat
eResultFile
(
results
,
false
).
isValid
?
resolve
(
true
)
:
reject
();
Json5FileValidator
.
validateFile
(
Exercis
eResult
s
File
,
results
,
false
).
isValid
?
resolve
(
true
)
:
reject
();
}
else
{
}
else
{
reject
();
reject
();
}
}
...
...
This diff is collapsed.
Click to expand it.
shared
@
f370f8b0
Compare
039c8b4e
...
f370f8b0
Subproject commit
039c8b4e10096a1c5036d01087d56443da636078
Subproject commit
f370f8b0a6e7b059d12f1980cdd21e3f2daa2f04
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