From 122ba38bebd0cd293581662e063691a1da4c756b Mon Sep 17 00:00:00 2001 From: Gabriel Carneiro Date: Wed, 4 Oct 2023 23:07:21 -0300 Subject: [PATCH] fix publish --- src/stream_auth/routes/stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stream_auth/routes/stream.py b/src/stream_auth/routes/stream.py index 9c6e216..3a25b42 100644 --- a/src/stream_auth/routes/stream.py +++ b/src/stream_auth/routes/stream.py @@ -22,7 +22,7 @@ def create_stream(): StreamModel(username, title, description) -@stream.route('/publish_check') +@stream.route('/publish_check', methods=['POST']) def publish_check(): # TODO: check if user created stream @@ -32,7 +32,7 @@ def publish_check(): stream_key = request.form.get('stream_key') username = request.form.get('name') stream_user = user.search_stream_key(stream_key)[0] - if username != stream_user['username']: + if username != stream_user['username'] or jwt.verify(stream_key.encode('utf-8')): raise ValueError except (IndexError, ValueError):