resolved conflict

This commit is contained in:
hyperbel 2023-10-30 01:42:02 +01:00
commit 5cee39d7bb
6 changed files with 92 additions and 0 deletions

2
Dockerfile Normal file
View File

@ -0,0 +1,2 @@
FROM python:3.11

14
party/game.py Normal file
View File

@ -0,0 +1,14 @@
from pymongo import MongoClient
class game:
status = None
CONNECTION_STRING = None
client = None
collection = None
initialized = False
@classmethod
def init(self, flaschenAnzahl: tuple[int, int] = None):
self.CONNECTION_STRING = "mongodb://localhost:27017/"
self.client = MongoClient(self.CONNECTION_STRING)['partyyy']
self.collection = self.client['game']

View File

@ -74,6 +74,44 @@ def api_chat():
response.status_code = 200
return response
@app.route('/api/game/', methods=['GET'])
def api_game():
response = jsonify(success=True)
response.status_code = 200
return response
@app.route('/api/game/point', methods=['GET','POST'])
def api_game_point():
if app.method == 'POST':
time = 3
return time
@app.route('/api/game/time', methods=['GET', 'POST'])
def api_game_time():
if app.method == 'POST':
point = 3
return point
@app.route('/api/team/', methods=['GET'])
def api_team():
response = jsonify(success=True)
response.status_code = 200
return response
@app.route('/api/team/create', methods=['POST'])
def api_team_create():
team_name = request.form['name']
@app.route('/api/team/join', methods=['POST'])
def api_team_join():
team_name = request.form['tname']
user_name = request.form['uname']
@app.route('/api/team/delete', methods=['POST'])
def api_team_delete():
team_name = request.form['name']
@socketio.on('chat-message')
def handle_chat_message(data):
print(data)

15
party/team.py Normal file
View File

@ -0,0 +1,15 @@
from pymongo import MongoClient
class team:
status = None
CONNECTION_STRING = None
client = None
collection = None
initialized = False
@classmethod
def init(self, flaschenAnzahl: tuple[int, int] = None):
self.CONNECTION_STRING = "mongodb://localhost:27017/"
self.client = MongoClient(self.CONNECTION_STRING)['partyyy']
self.collection = self.client['team']

View File

@ -67,6 +67,9 @@
<h1>Home</h1>
<p>
Willkommen zur diesjährigen 24-stündigen LAN-Party! Wir haben ein spannendes Line-up mit Spiel 1, Spiel 2 und Spiel 3 vorbereitet. Lasst uns gemeinsam unvergessliche Gaming-Momente schaffen! Möge die Party beginnen, und möge die Beste Person gewinnen!</p>
<p>Aktuelles Spiel:<span></span></p>
<p>Verfügbare Mate:<span></span></p>
<p>Uptime: <span></span></p>
</article>
<!-- Planer -->
@ -139,8 +142,19 @@
</tr>
</tbody>
</table>
<<<<<<< HEAD
<table id="punkte_table">
<thead>
=======
<button>Team erstellen</button>
<button>Team beitreten</button>
<button>Team löschen</button>
</div>
<div id="punkt" class="hidden1">
<table id="point_game">
<tbody>
>>>>>>> b02ec01d4c1f434f985e52c60c1142f162e7e63b
<tr>
<td>User</td>
<td>Game</td>
@ -173,7 +187,14 @@
</tbody>
</table>
</center>
<<<<<<< HEAD
</article>
=======
</div>
<button>Spiele Zeigen</button>
<p>Aktuelles Spiel: </p>
</div>
>>>>>>> b02ec01d4c1f434f985e52c60c1142f162e7e63b
<!-- Chat -->
<article id="chat">

View File

@ -3,3 +3,5 @@ db.createCollection('mate');
db.createCollection('messages');
db.createCollection('events');
db.createCollection('systemMonitor');
db.createCollection('teams')
db.createCollection('game')