Omkar008 commited on
Commit
b42bcc4
1 Parent(s): f027aaa

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +4 -3
test.py CHANGED
@@ -151,7 +151,7 @@ async def auth_google(request: Request):
151
  return {"attachment_count":attachment_no,"attachment_content":data_new}
152
 
153
  @app.websocket("/ws")
154
- async def auth_google(websocket: WebSocket):
155
  #This code is basically the authorization code and this authorization code helps us to get the access token with the required scopes that we have set .
156
  #We require the gmail.readonly scopes that requires verification of our application and all.
157
  # raw_body = await request.body()
@@ -164,8 +164,9 @@ async def auth_google(websocket: WebSocket):
164
  # await websocket.send_json({"message":"Yes Websockets successfull"})
165
  print("working after line 163")
166
  data = websocket.receive_json()
167
- code = data.get("message")
168
- print(code)
 
169
  # code = raw_body.decode()
170
  def get_messages():
171
  print()
 
151
  return {"attachment_count":attachment_no,"attachment_content":data_new}
152
 
153
  @app.websocket("/ws")
154
+ async def test_websocket(websocket: WebSocket):
155
  #This code is basically the authorization code and this authorization code helps us to get the access token with the required scopes that we have set .
156
  #We require the gmail.readonly scopes that requires verification of our application and all.
157
  # raw_body = await request.body()
 
164
  # await websocket.send_json({"message":"Yes Websockets successfull"})
165
  print("working after line 163")
166
  data = websocket.receive_json()
167
+ print(data)
168
+ # code = data.get("message")
169
+ # print(code)
170
  # code = raw_body.decode()
171
  def get_messages():
172
  print()