Skip to content
Snippets Groups Projects
Unverified Commit 922ba5de authored by Piero Toffanin's avatar Piero Toffanin Committed by GitHub
Browse files

Merge pull request #164 from fushinari/suggest-req-key

Require API key for submitting suggestions
parents 56e81856 29eca1fb
No related branches found
No related tags found
No related merge requests found
......@@ -811,7 +811,7 @@ def create_app(args):
)
@app.route("/suggest", methods=["POST"])
@limiter.exempt
@access_check
def suggest():
"""
Submit a suggestion to improve a translation
......
......@@ -290,6 +290,7 @@ document.addEventListener('DOMContentLoaded', function(){
data.append("s", self.translatedText);
data.append("source", self.sourceLang);
data.append("target", self.targetLang);
data.append("api_key", localStorage.getItem("api_key") || "");
request.open('POST', BaseUrl + '/suggest', true);
request.onload = function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment