From cdde2652b4a3514cf708ffd1f299b692f189328b Mon Sep 17 00:00:00 2001 From: TatLead Date: Fri, 15 Mar 2024 20:00:17 +0000 Subject: [PATCH] Update app.py --- app.py | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 447ed3c..7755906 100644 --- a/app.py +++ b/app.py @@ -6,7 +6,7 @@ import markdown from config import build_config_file -from protocols import MasterServer, BeamMP, Factorio, Palworld, Scum +from protocols import MasterServer, BeamMP, Factorio, Front, Palworld, Scum from version import __version__ app = Flask(__name__) @@ -112,6 +112,34 @@ def factorio_search(): return search(request.args, Factorio()) +@app.route('/front/search', methods=['GET']) +def front_search(): + """ + Front Search + This endpoint allows you to search for a Front server using its host and port. + --- + tags: + - Search EndPoint + parameters: + - name: host + in: query + type: string + required: true + - name: port + in: query + type: integer + required: true + responses: + 200: + description: Success + 400: + description: Invalid parameters were supplied. 'host' and 'port' must be provided, and 'port' must be an integer. + 404: + description: No server was found with the provided host and port. + """ + return search(request.args, Front()) + + @app.route('/palworld/search', methods=['GET']) def palworld_search(): """