Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 5, 2023
1 parent dd478d5 commit 97d4814
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions zndraw/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import multiprocessing as mp
import uuid

from flask import Flask, render_template, request, session, redirect
from flask import Flask, redirect, render_template, request, session
from flask_socketio import SocketIO, emit, join_room

from zndraw.data import atoms_from_json
Expand Down Expand Up @@ -50,11 +50,13 @@ def index():
uuid=session["uuid"],
)


@app.route("/token/<token>")
def token(token):
session["uuid"] = token
return redirect("/")



@io.on("join")
def on_join(data):
"""Join a room."""
Expand Down
2 changes: 1 addition & 1 deletion zndraw/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ <h3>Share Link</h3>
const url = window.location.href.replace(/\/$/, "");
const target_href = "{{ url_for('token', token=uuid) }}";
const full_url = url + target_href;

document.getElementById("share-link-block").innerHTML = full_url;

document.getElementById("btnShareLink").onclick = function(event) {
Expand Down

0 comments on commit 97d4814

Please sign in to comment.