Преглед на файлове

change test env from get to post

ming преди 3 години
родител
ревизия
aa23c34a37
променени са 1 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 4 4
      api/main.py

+ 4 - 4
api/main.py

@@ -677,6 +677,9 @@ def gen_avatar(name_hash, imgurl):
         statement = 'UPDATE avatar_service_status SET status = 0 WHERE id=1;'  #only one row in this table, which id 1 one
         db.query(statement)
 def call_voice(text):
+    print(text)
+    print(len(text))
+    print(type(text))
     c = rpyc.connect("localhost", 8868)
     c._config['sync_request_timeout'] = None
     remote_svc = c.root
@@ -689,10 +692,7 @@ class text_in(BaseModel):
     text: str
 @app.post("/make_voice")
 async def make_voice(in_text:text_in):
-    print(in_text.text)
-    print(len(in_text.text))
-    print(type(in_text.text))
-    x = threading.Thread(target=call_voice, args=(in_text.text,))
+    x = threading.Thread(target=call_voice, args=(in_text.text))
     x.start()