Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Tabu-Middleware
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Tabu-Middleware
Commits
a4c704ee
Commit
a4c704ee
authored
Dec 28, 2020
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Postrequest: isSpielSession
parent
87d0b027
Pipeline
#280
passed with stages
in 2 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
events.js
events.js
+18
-0
No files found.
events.js
View file @
a4c704ee
...
@@ -23,6 +23,24 @@ function createRouter(db) {
...
@@ -23,6 +23,24 @@ function createRouter(db) {
}
}
});
});
router
.
post
(
'
/isSpielSession
'
,
(
req
,
res
)
=>
{
db
.
query
(
'
SELECT SessionName FROM Spielsession WHERE SessionName =
\'
'
+
req
.
body
.
spielname
+
'
\'
;
'
,
(
error
,
results
)
=>
{
if
(
error
)
{
console
.
log
(
error
);
res
.
status
(
500
).
json
({
status
:
'
error
'
});
}
else
{
if
(
results
.
length
>
0
)
{
res
.
status
(
200
).
json
({
status
:
'
true
'
});
}
else
{
res
.
status
(
200
).
json
({
status
:
'
false
'
});
}
}
}
);
});
router
.
get
(
'
/SpielSession
'
,
function
(
req
,
res
)
{
router
.
get
(
'
/SpielSession
'
,
function
(
req
,
res
)
{
db
.
query
(
db
.
query
(
'
SELECT * FROM Spielsession
'
,
'
SELECT * FROM Spielsession
'
,
...
...
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