Add endpoint that only returns the total number
This commit is contained in:
parent
4f1835c8f8
commit
29459d5386
8
wsgi.py
8
wsgi.py
@ -431,5 +431,13 @@ def dashboard():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/total")
|
||||||
|
@cache.cached(timeout=60)
|
||||||
|
def total_result(url: str = "https://beschaeftigtenbefragung.verdi.de/"):
|
||||||
|
df, df_state, curr_datetime = get_tables(url)
|
||||||
|
total = df_state["Digitale Befragung"].sum().item()
|
||||||
|
return f"{total}"
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run()
|
app.run()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user