Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
oetzit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
commul
oetzit
Commits
1bea4045
Commit
1bea4045
authored
3 years ago
by
Paolo.Brasolin
Browse files
Options
Downloads
Patches
Plain Diff
feat: #fe consistently handle backend URLs
parent
1306afe7
No related branches found
No related tags found
No related merge requests found
Pipeline
#23363
passed with warnings
3 years ago
Stage: setup
Stage: check
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/js/main.js
+7
-4
7 additions, 4 deletions
frontend/src/js/main.js
with
7 additions
and
4 deletions
frontend/src/js/main.js
+
7
−
4
View file @
1bea4045
...
...
@@ -5,6 +5,11 @@ import "popper.js";
import
"
bootstrap
"
;
import
*
as
bootbox
from
"
bootbox
"
;
import
"
../css/override.css
"
;
import
path
from
"
path
"
;
const
BACKEND_URL
=
new
URL
(
process
.
env
.
BACKEND_URL
);
const
backendEndpointURL
=
(
endpoint
)
=>
new
URL
(
path
.
join
(
BACKEND_URL
.
pathname
,
endpoint
),
BACKEND_URL
);
let
config
=
{
type
:
Phaser
.
AUTO
,
...
...
@@ -86,8 +91,6 @@ function preload() {
});
}
window
.
OetziWordsSiteUrlPrefix
=
process
.
env
.
BACKEND_URL
;
let
gameRunning
=
false
;
let
player
;
let
scene
;
...
...
@@ -218,7 +221,7 @@ function dispatchEnemy() {
let
e
=
new
enemy
();
axios
.
post
(
window
.
OetziWordsSiteUrlPrefix
+
"
GetImage
"
,
{
.
post
(
backendEndpointURL
(
"
GetImage
"
)
,
{
sessionImages
:
imageInUse
,
})
.
then
(
function
(
response
)
{
...
...
@@ -310,7 +313,7 @@ class enemy {
}
axios
.
post
(
window
.
OetziWordsSiteUrlPrefix
+
"
CheckTranscription
"
,
{
.
post
(
backendEndpointURL
(
"
CheckTranscription
"
)
,
{
refData
:
me
.
refData
,
transcription
:
result
,
deltaTime
:
deltaTime
,
...
...
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