ADD New Pre-Commit hooks and Formatting code

This commit is contained in:
Kentai Radiquum 2024-04-23 18:30:35 +05:00
parent 5c9c3e67fa
commit 9e75a0783c
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
26 changed files with 4163 additions and 105 deletions

View file

@ -1,14 +1,17 @@
from typing import Union
from fastapi import APIRouter
from fastapi import Request
from modules.proxy import apiRequest
from modules.proxy import ENDPOINTS
from typing import Union
router = APIRouter()
@router.get("/{user_id}", summary="Get user profile by user ID")
async def getUserById(request: Request, user_id: str, short: bool = False, token: Union[None, str] = None):
async def getUserById(
request: Request, user_id: str, short: bool = False, token: Union[None, str] = None
):
query = ""
if token:
query = f"?token={token}"
@ -23,5 +26,5 @@ async def getUserById(request: Request, user_id: str, short: bool = False, token
"login": res["profile"]["login"],
"avatar": res["profile"]["avatar"],
},
"is_my_profile": res["is_my_profile"]
"is_my_profile": res["is_my_profile"],
}