Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Mar 15, 2024
1 parent 328ab18 commit cdde265
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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():
"""
Expand Down

0 comments on commit cdde265

Please sign in to comment.