mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-12-18 08:27:03 +02:00
Merge pull request #164 from fushinari/suggest-req-key
Require API key for submitting suggestions
This commit is contained in:
commit
922ba5de40
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user