updates routines script and google certification handling

This commit is contained in:
2020-05-15 16:00:54 +02:00
parent 5e7080695d
commit 2ecb5a4b71
4 changed files with 18 additions and 10 deletions

View File

@ -76,6 +76,14 @@ def register():
return redirect(url_for('emaillogin'))
return render_template('register.html', title='Register', form=form)
@app.route("/test")
def testAPI():
if current_user.is_authenticated:
google.updateCalendars()
return redirect('/account')
@app.route("/login/google")
def googlelogin():
authorization_url = google.login()
@ -128,8 +136,8 @@ def credentials_to_dict(credentials):
@app.route("/userinfo/<path:user>/calendarevents.json")
def downloader(user):
print(user)
path = "userinfo/" + user
path = "/home/calendarwatch/userinfo/" + user + "/"
print(path, flush=True)
return flask.send_from_directory(path, "calendarevents.json")
# POST