diff --git a/.gitignore b/.gitignore index 3d7cd57..350b481 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ video audio resource/*.zip -error.log \ No newline at end of file +error.log +*.db \ No newline at end of file diff --git a/server.py b/server.py index e05e404..9e8864b 100644 --- a/server.py +++ b/server.py @@ -114,15 +114,15 @@ def make_video(): @app.route('/api/feedback', methods = ['POST']) def feedback(): - text = request.values.get('feedback') - if text is None: + feedback = request.values.get('feedback') + if feedback is None: return make_response("need feedback", 400) - text = text.strip() - if len(text) == 0: + feedback = feedback.strip() + if len(feedback) == 0: return make_response("feedback is empty", 400) - if len(text) > 500: + if len(feedback) > 500: return make_response("feedback is too long", 400) - save_to_db(text) + save_to_db(feedback) return make_response("successful", 200) @app.context_processor diff --git a/templates/index.html b/templates/index.html index 07e2204..a68eef8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -208,6 +208,12 @@