Commit war crimes in formal Yugoslavia

This commit is contained in:
Luca Warmenhoven
2024-05-28 11:53:28 +02:00
parent 652d7c501d
commit caa7599518
2 changed files with 21 additions and 11 deletions

19
.idea/workspace.xml generated
View File

@@ -14,8 +14,8 @@
</configurations> </configurations>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="updated gay"> <list default="true" id="00599d5b-7eb5-44da-ad7f-98bf42384c16" name="Changes" comment="Commit crack cocaine">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/code/web/incoming_request_handlers.js" beforeDir="false" afterPath="$PROJECT_DIR$/code/web/incoming_request_handlers.js" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -196,7 +196,7 @@
<workItem from="1716547378856" duration="243000" /> <workItem from="1716547378856" duration="243000" />
<workItem from="1716648462646" duration="8555000" /> <workItem from="1716648462646" duration="8555000" />
<workItem from="1716674767699" duration="21000" /> <workItem from="1716674767699" duration="21000" />
<workItem from="1716889548355" duration="19000" /> <workItem from="1716889548355" duration="371000" />
</task> </task>
<task id="LOCAL-00001" summary="Changes"> <task id="LOCAL-00001" summary="Changes">
<created>1713528225837</created> <created>1713528225837</created>
@@ -338,7 +338,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1716658499589</updated> <updated>1716658499589</updated>
</task> </task>
<option name="localTasksCounter" value="19" /> <task id="LOCAL-00019" summary="Commit crack cocaine">
<option name="closed" value="true" />
<created>1716889664199</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1716889664199</updated>
</task>
<option name="localTasksCounter" value="20" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -375,6 +383,7 @@
<MESSAGE value="Added NodeJS Server files" /> <MESSAGE value="Added NodeJS Server files" />
<MESSAGE value="killed my brain doing literature" /> <MESSAGE value="killed my brain doing literature" />
<MESSAGE value="updated gay" /> <MESSAGE value="updated gay" />
<option name="LAST_COMMIT_MESSAGE" value="updated gay" /> <MESSAGE value="Commit crack cocaine" />
<option name="LAST_COMMIT_MESSAGE" value="Commit crack cocaine" />
</component> </component>
</project> </project>

View File

@@ -8,18 +8,19 @@
*/ */
function handleIncoming(request, response, app, pool) function handleIncoming(request, response, app, pool)
{ {
let query = 'SELECT * FROM Exercise WHERE ExerciseID = ?';
let parameters = [];
if (!request.hasOwnProperty('uid') || typeof request.uid !== 'number') if (!request.hasOwnProperty('uid') || typeof request.uid !== 'number')
{ {
response query = 'SELECT * FROM Exercise';
.status(400) } else parameters.push(request.uid);
.send(JSON.stringify({error: 'Missing valid UID in request'}));
return;
}
// Acquire database connection // Acquire database connection
pool.getConnection() pool.getConnection()
.then(conn => { .then(conn => {
conn.query('SELECT * FROM Exercise WHERE ExerciseID = ?', [request.uid]) conn.query(query, parameters)
.then(rows => { .then(rows => {
if (rows.length === 0) if (rows.length === 0)
{ {