Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoExerciseChecker
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
Pipelines
DojoExerciseChecker
Commits
f37f50f0
Commit
f37f50f0
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
DojoBackendManager => Update dependencies (from submodule update)
parent
e8685a66
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ExerciceChecker/src/managers/DojoBackendManager.ts
+4
-4
4 additions, 4 deletions
ExerciceChecker/src/managers/DojoBackendManager.ts
with
4 additions
and
4 deletions
ExerciceChecker/src/managers/DojoBackendManager.ts
+
4
−
4
View file @
f37f50f0
import
ClientsSharedConfig
from
'
../sharedByClients/config/ClientsSharedConfig
'
;
import
ClientsSharedConfig
from
'
../sharedByClients/config/ClientsSharedConfig
'
;
import
ApiRoutes
from
'
../sharedByClients/types/ApiRoutes
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
DojoResponse
from
'
../shared/types/Dojo/DojoResponse
'
;
import
DojoResponse
from
'
../shared/types/Dojo/DojoResponse
'
;
import
ExerciceEnonce
from
'
../sharedByClients/models/ExerciceEnonce
'
;
import
ExerciceEnonce
from
'
../sharedByClients/models/ExerciceEnonce
'
;
import
Config
from
'
../config/Config
'
;
import
Config
from
'
../config/Config
'
;
import
ExerciceResultsFile
from
'
../shared/types/Dojo/ExerciceResultsFile
'
;
import
ExerciceResultsFile
from
'
../shared/types/Dojo/ExerciceResultsFile
'
;
import
ApiRoute
from
'
../sharedByClients/types/Dojo/ApiRoute
'
;
class
DojoBackendManager
{
class
DojoBackendManager
{
public
getApiUrl
(
route
:
ApiRoute
s
):
string
{
public
getApiUrl
(
route
:
ApiRoute
):
string
{
return
`
${
ClientsSharedConfig
.
apiURL
}${
route
}
`
;
return
`
${
ClientsSharedConfig
.
apiURL
}${
route
}
`
;
}
}
public
async
getExerciceEnonce
():
Promise
<
ExerciceEnonce
|
undefined
>
{
public
async
getExerciceEnonce
():
Promise
<
ExerciceEnonce
|
undefined
>
{
try
{
try
{
return
(
await
axios
.
get
<
DojoResponse
<
ExerciceEnonce
>>
(
this
.
getApiUrl
(
ApiRoute
s
.
EXERCICE_ENONCE
).
replace
(
'
{{id}}
'
,
Config
.
exercice
.
id
))).
data
.
data
;
return
(
await
axios
.
get
<
DojoResponse
<
ExerciceEnonce
>>
(
this
.
getApiUrl
(
ApiRoute
.
EXERCICE_ENONCE
).
replace
(
'
{{id}}
'
,
Config
.
exercice
.
id
))).
data
.
data
;
}
catch
(
error
)
{
}
catch
(
error
)
{
return
undefined
;
return
undefined
;
}
}
...
@@ -22,7 +22,7 @@ class DojoBackendManager {
...
@@ -22,7 +22,7 @@ class DojoBackendManager {
public
async
sendResults
(
exitCode
:
number
,
commit
:
any
,
results
:
ExerciceResultsFile
,
files
:
any
,
archiveBase64
:
string
):
Promise
<
void
>
{
public
async
sendResults
(
exitCode
:
number
,
commit
:
any
,
results
:
ExerciceResultsFile
,
files
:
any
,
archiveBase64
:
string
):
Promise
<
void
>
{
try
{
try
{
await
axios
.
post
(
this
.
getApiUrl
(
ApiRoute
s
.
EXERCICE_RESULTS
).
replace
(
'
{{id}}
'
,
Config
.
exercice
.
id
),
{
await
axios
.
post
(
this
.
getApiUrl
(
ApiRoute
.
EXERCICE_RESULTS
).
replace
(
'
{{id}}
'
,
Config
.
exercice
.
id
),
{
exitCode
:
exitCode
,
exitCode
:
exitCode
,
commit
:
JSON
.
stringify
(
commit
),
commit
:
JSON
.
stringify
(
commit
),
results
:
JSON
.
stringify
(
results
),
results
:
JSON
.
stringify
(
results
),
...
...
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