Skip to content

Commit

Permalink
pass params
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanarik committed Oct 19, 2024
1 parent 0cdd4fa commit 5b7cd70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion function_app.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import logging
import azure.functions as func
import spotbot as sb
import tables
import discord_http
import cleanup

app = func.FunctionApp(http_auth_level=func.AuthLevel.FUNCTION)

@app.route(route="spotbot", methods=[func.HttpMethod.POST])
def spotbot(req: func.HttpRequest) -> func.HttpResponse:
try:
sb.SpotBot(req).process()
sb.SpotBot(req, tables.HamAlertTable(), discord_http.DiscordHttp()).process()
except Exception as _excpt:
logging.error(f"Exception occurred: {_excpt}")
return func.HttpResponse(body=f"Exception occurred: {_excpt}", status_code=500)
Expand Down

0 comments on commit 5b7cd70

Please sign in to comment.