We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a9e42e commit c0b5f60Copy full SHA for c0b5f60
1 file changed
background/app/main.py
@@ -64,7 +64,7 @@ def translate():
64
to_language = request.form.get("lang", "")
65
66
if source_string == "":
67
- return f"Invalid request, you must provide a value.", 400
+ return "Invalid request, you must provide a value.", 400
68
69
if to_language not in ACCEPTABLE_LANGUAGES:
70
return f"Unsupported language: {to_language}", 400
@@ -76,7 +76,9 @@ def translate():
76
"OriginalLanguage": "",
77
}
78
79
- topic_name = f"projects/{os.getenv('GOOGLE_CLOUD_PROJECT')}/topics/translate"
+ topic_name = (
80
+ f"projects/{os.getenv('GOOGLE_CLOUD_PROJECT')}/topics/translate"
81
+ )
82
publisher.publish(
83
topic=topic_name, data=json.dumps(message).encode("utf-8")
84
)
0 commit comments