MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / decorated_function

Function decorated_function

app/views.py:22–30  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

20
21 @functools.wraps(func)
22 def decorated_function(*args, **kwargs):
23 if not session.is_auth_valid():
24 response = flask.redirect('/login' + _login_redirect_query())
25 # Prevent Flask from converting the redirect location into an
26 # absolute URL. This generates incorrect results, since we are
27 # sitting behind a proxy.
28 response.autocorrect_location_header = False
29 return response
30 return func(*args, **kwargs)
31
32 return decorated_function
33

Callers

nothing calls this directly

Calls 1

_login_redirect_queryFunction · 0.85

Tested by

no test coverage detected