Add code to needs_signin example

This commit is contained in:
Scoder12
2020-07-28 16:25:05 -07:00
parent 93e5a2c25d
commit 2d571ce305
+20
View File
@@ -0,0 +1,20 @@
from replit import maqpy
app = maqpy.App(__name__)
@app.route("/")
@needs_signin(login_html=f"Hello! {maqpy.sign_in_snippet}")
def index():
return "Index function"
# needs_signin can also be called with no args
@app.route("/test")
@needs_signin
def test():
return "Test function"
if __name__ == "__main__":
app.run()