🚨 deepsource
This commit is contained in:
@@ -42,7 +42,7 @@ async def join_game(sid, data):
|
|||||||
|
|
||||||
|
|
||||||
@sio.event
|
@sio.event
|
||||||
async def start_game(sid, data):
|
async def start_game(sid, _data):
|
||||||
# print(sid, data, "START_GAME")
|
# print(sid, data, "START_GAME")
|
||||||
session = await sio.get_session(sid)
|
session = await sio.get_session(sid)
|
||||||
# print(session)
|
# print(session)
|
||||||
@@ -113,7 +113,7 @@ async def submit_answer(sid, data):
|
|||||||
|
|
||||||
|
|
||||||
@sio.event
|
@sio.event
|
||||||
async def get_game_data(sid, data):
|
async def get_game_data(sid, _data):
|
||||||
game_pin = (await sio.get_session(sid))['game_pin']
|
game_pin = (await sio.get_session(sid))['game_pin']
|
||||||
game_data = await redis.get(f"game:{game_pin}")
|
game_data = await redis.get(f"game:{game_pin}")
|
||||||
if game_data is not None:
|
if game_data is not None:
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ export async function getSession(event) {
|
|||||||
if (redis_res === null) {
|
if (redis_res === null) {
|
||||||
const res = await fetch(`${process.env.API_URL}/api/v1/users/check`, {
|
const res = await fetch(`${process.env.API_URL}/api/v1/users/check`, {
|
||||||
headers: {
|
headers: {
|
||||||
Cookie: `access_token=Bearer ${event.locals.token}`
|
Cookie: `access_token=Bearer ${event.locals.token}` // skipcq: JS-0378
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
const json = await res.json();
|
const json = await res.json();
|
||||||
//@ts-ignore
|
//@ts-ignore // skipcq: JS-0295
|
||||||
user_email = json.email;
|
user_email = json.email;
|
||||||
} else {
|
} else {
|
||||||
user_email = null;
|
user_email = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user